From 1dd185074747d40e42354afff8999469cda7f7be Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 22 Aug 2023 11:01:58 +0100 Subject: [PATCH] ch-remote: dbus: Remove unnecessary mut from reference warning: this argument is a mutable reference, but not used mutably --> src/bin/ch-remote.rs:397:52 | 397 | fn dbus_api_do_command(toplevel: &TopLevel, proxy: &mut DBusApi1ProxyBlocking<'_>) -> ApiResult { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&DBusApi1ProxyBlocking<'_>` | = note: this is cfg-gated and may require further changes = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default Signed-off-by: Rob Bradford --- src/bin/ch-remote.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/ch-remote.rs b/src/bin/ch-remote.rs index f80a4a19a..4d726a688 100644 --- a/src/bin/ch-remote.rs +++ b/src/bin/ch-remote.rs @@ -394,7 +394,7 @@ fn rest_api_do_command(toplevel: &TopLevel, socket: &mut UnixStream) -> ApiResul } #[cfg(feature = "dbus_api")] -fn dbus_api_do_command(toplevel: &TopLevel, proxy: &mut DBusApi1ProxyBlocking<'_>) -> ApiResult { +fn dbus_api_do_command(toplevel: &TopLevel, proxy: &DBusApi1ProxyBlocking<'_>) -> ApiResult { match toplevel.command { SubCommandEnum::Boot(_) => proxy.api_vm_boot(), SubCommandEnum::Delete(_) => proxy.api_vm_delete(),