From bb0145404f52e5a21f25eecc9135e0e52b710824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Thu, 14 Nov 2024 18:45:39 -0300 Subject: [PATCH] src: lib: cli: use args() function instead of direct access --- src/lib/cli.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/cli.rs b/src/lib/cli.rs index f9c247e..a5b343f 100644 --- a/src/lib/cli.rs +++ b/src/lib/cli.rs @@ -166,11 +166,7 @@ pub fn is_verbose() -> bool { #[instrument(level = "debug")] pub fn is_tracing() -> bool { - MANAGER - .get() - .unwrap() - .clap_matches - .enable_tracing_level_log_file + args().enable_tracing_level_log_file } #[instrument(level = "debug")] @@ -231,11 +227,7 @@ pub fn mavlink_component_id() -> u8 { #[instrument(level = "debug")] pub fn mavlink_heartbeat_frequency() -> f32 { - MANAGER - .get() - .unwrap() - .clap_matches - .mavlink_heartbeat_frequency + args().mavlink_heartbeat_frequency } #[instrument(level = "debug")]