From e70bf598097b78e43d4f2dfef5fe41f1348dba70 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 6 Feb 2024 21:00:52 +0000 Subject: [PATCH] vmm: Directly clone console resize pipe Beta clippy fix: warning: this call to `as_ref.map(...)` does nothing --> vmm/src/device_manager.rs:1234:9 | 1234 | self.console_resize_pipe.as_ref().map(Arc::clone) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.console_resize_pipe.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref = note: `#[warn(clippy::useless_asref)]` on by default Signed-off-by: Rob Bradford --- vmm/src/device_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index f0a3bbea0..70a06217e 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -1231,7 +1231,7 @@ impl DeviceManager { } pub fn console_resize_pipe(&self) -> Option> { - self.console_resize_pipe.as_ref().map(Arc::clone) + self.console_resize_pipe.clone() } pub fn create_devices(