From 04a82c7be173b2068c4254ed4a129e24e9e3a2e4 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 24 Sep 2019 11:06:58 -0700 Subject: devices: vfio: fix clippy warnings Fix boxed_local, const_static_lifetime, useless_format, and redundant_closure clippy warnings in the VFIO code. This fixes all clippy warnings except a single instance of let_and_return in VfioPciDevice::keep_fds(), since that code is modified in an upcoming patch. BUG=None TEST=./build_test.py TEST=bin/clippy Change-Id: I548adbc6b92448fc0db82ed72214d73b0eabaf5c Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1822697 Reviewed-by: Xiong Zhang Reviewed-by: Zach Reizner Tested-by: Xiong Zhang Tested-by: kokoro --- src/linux.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/linux.rs') diff --git a/src/linux.rs b/src/linux.rs index c761240..6de02e9 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -990,7 +990,7 @@ fn create_devices( if cfg.vfio.is_some() { let vfio_path = cfg.vfio.as_ref().unwrap().as_path(); let vfiodevice = - Box::new(VfioDevice::new(vfio_path, vm, mem.clone()).map_err(Error::CreateVfioDevice)?); + VfioDevice::new(vfio_path, vm, mem.clone()).map_err(Error::CreateVfioDevice)?; let vfiopcidevice = Box::new(VfioPciDevice::new(vfiodevice)); pci_devices.push((vfiopcidevice, simple_jail(&cfg, "vfio_device.policy")?)); } -- cgit 1.4.1