summary refs log tree commit diff
path: root/devices/src/pci/vfio_pci.rs
diff options
context:
space:
mode:
Diffstat (limited to 'devices/src/pci/vfio_pci.rs')
-rw-r--r--devices/src/pci/vfio_pci.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/src/pci/vfio_pci.rs b/devices/src/pci/vfio_pci.rs
index 9073312..5b0474a 100644
--- a/devices/src/pci/vfio_pci.rs
+++ b/devices/src/pci/vfio_pci.rs
@@ -100,8 +100,8 @@ pub struct VfioPciDevice {
 
 impl VfioPciDevice {
     /// Constructs a new Vfio Pci device for the give Vfio device
-    pub fn new(device: Box<VfioDevice>) -> Self {
-        let dev = Arc::new(*device);
+    pub fn new(device: VfioDevice) -> Self {
+        let dev = Arc::new(device);
         let config = VfioPciConfig::new(Arc::clone(&dev));
         VfioPciDevice {
             device: dev,
@@ -131,7 +131,7 @@ impl VfioPciDevice {
 
 impl PciDevice for VfioPciDevice {
     fn debug_label(&self) -> String {
-        format!("vfio pci device")
+        "vfio pci device".to_string()
     }
 
     fn assign_bus_dev(&mut self, bus: u8, device: u8) {