mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
clippy: Fix redundant allocations
With the new beta version, clippy complains about redundant allocation when using Arc<Box<dyn T>>, and suggests replacing it simply with Arc<dyn T>. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -136,8 +136,7 @@ pub trait InterruptManager: Send + Sync {
|
||||
/// * interrupt_type: type of interrupt source.
|
||||
/// * base: base Interrupt Source ID to be managed by the group object.
|
||||
/// * count: number of Interrupt Sources to be managed by the group object.
|
||||
fn create_group(&self, config: Self::GroupConfig)
|
||||
-> Result<Arc<Box<dyn InterruptSourceGroup>>>;
|
||||
fn create_group(&self, config: Self::GroupConfig) -> Result<Arc<dyn InterruptSourceGroup>>;
|
||||
|
||||
/// Destroy an [InterruptSourceGroup](trait.InterruptSourceGroup.html) object created by
|
||||
/// [create_group()](trait.InterruptManager.html#tymethod.create_group).
|
||||
@@ -145,7 +144,7 @@ pub trait InterruptManager: Send + Sync {
|
||||
/// Assume the caller takes the responsibility to disable all interrupt sources of the group
|
||||
/// before calling destroy_group(). This assumption helps to simplify InterruptSourceGroup
|
||||
/// implementations.
|
||||
fn destroy_group(&self, group: Arc<Box<dyn InterruptSourceGroup>>) -> Result<()>;
|
||||
fn destroy_group(&self, group: Arc<dyn InterruptSourceGroup>) -> Result<()>;
|
||||
}
|
||||
|
||||
pub trait InterruptSourceGroup: Send + Sync {
|
||||
|
||||
Reference in New Issue
Block a user