From 58db1673b917f2195a599d7575d3559ff6ff7410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Mon, 21 Oct 2024 22:32:07 -0300 Subject: [PATCH 1/3] src: cli: Prefer implicit return --- src/lib/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cli.rs b/src/lib/cli.rs index 290ccb0f..4795051c 100644 --- a/src/lib/cli.rs +++ b/src/lib/cli.rs @@ -154,7 +154,7 @@ pub fn endpoints() -> Vec> { let default_endpoints = Arc::new(crate::drivers::rest::Rest::builder("Default").build()); let mut endpoints = MANAGER.clap_matches.endpoints.clone(); endpoints.push(default_endpoints); - return endpoints; + endpoints } #[instrument(level = "debug")] From be79e41a5f2ab1951c08287cff91bc5bea8b087e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Mon, 21 Oct 2024 22:32:29 -0300 Subject: [PATCH 2/3] src: cli: Remove use of useless vec --- src/lib/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cli.rs b/src/lib/cli.rs index 4795051c..5ba3b704 100644 --- a/src/lib/cli.rs +++ b/src/lib/cli.rs @@ -83,7 +83,7 @@ fn build_endpoints_help() -> String { .collect::>() .join("\n\t\t "); - vec![ + [ format!("{name}\t {help_schemas}").to_string(), format!("\t legacy: {help_legacy}").to_string(), format!("\t url: {help_url}\n").to_string(), From e61b762c269fd9c7327ed7c72f38c2108cb38bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Mon, 21 Oct 2024 21:30:18 -0300 Subject: [PATCH 3/3] src: lib: web: Adjust debug message for better information --- src/lib/web/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/web/mod.rs b/src/lib/web/mod.rs index 34314e59..2fe83121 100644 --- a/src/lib/web/mod.rs +++ b/src/lib/web/mod.rs @@ -77,7 +77,7 @@ async fn websocket_connection(socket: WebSocket, state: AppState) { broadcast_message_websockets(&state, identifier, Message::Text(text)).await; } Message::Close(frame) => { - debug!("WS client {identifier} disconnected: {frame:#?}"); + debug!("WS client {identifier} disconnected: {frame:?}"); break; } _ => {}