From d76ece0cf36dbf53dddc9d85e449978704c54b6a Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Thu, 24 Sep 2020 13:04:29 +0200 Subject: [PATCH] rust-agent: Remove useless braces This addresses the following warning: warning: unnecessary braces around assigned value --> src/rpc.rs:1411:26 | 1411 | detail.init_daemon = { unistd::getpid() == Pid::from_raw(1) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces | = note: `#[warn(unused_braces)]` on by default Fixes: #750 Signed-off-by: Christophe de Dinechin --- src/agent/src/rpc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent/src/rpc.rs b/src/agent/src/rpc.rs index c1351e6360..2b3ed22077 100644 --- a/src/agent/src/rpc.rs +++ b/src/agent/src/rpc.rs @@ -1447,7 +1447,7 @@ fn get_agent_details() -> AgentDetails { detail.set_version(AGENT_VERSION.to_string()); detail.set_supports_seccomp(false); - detail.init_daemon = { unistd::getpid() == Pid::from_raw(1) }; + detail.init_daemon = unistd::getpid() == Pid::from_raw(1); detail.device_handlers = RepeatedField::new(); detail.storage_handlers = RepeatedField::from_vec(