From 2ca29276577b6f7fbdb1bd04f611936da38fc235 Mon Sep 17 00:00:00 2001 From: Paulo Aboim Pinto Date: Mon, 1 Jun 2026 22:19:48 +0200 Subject: [PATCH] fix: clippy needless_return and fmt compliance Remove unneeded return in utils.rs (crates/tui/src/utils.rs:256) that was caught by clippy on the new commit. Also run cargo fmt to satisfy format checks. --- crates/tui/src/tui/ui.rs | 5 ++--- crates/tui/src/utils.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/tui/src/tui/ui.rs b/crates/tui/src/tui/ui.rs index 7ebaa816..b5fa3f08 100644 --- a/crates/tui/src/tui/ui.rs +++ b/crates/tui/src/tui/ui.rs @@ -508,8 +508,7 @@ pub async fn run_tui(config: &Config, options: TuiOptions) -> Result<()> { // switch), so a brand-new session would otherwise leave it None and both // exec_shell shell_env hooks and ToolCallBefore gate would silently no-op. if app.runtime_services.hook_executor.is_none() { - app.runtime_services.hook_executor = - Some(std::sync::Arc::new(app.hooks.clone())); + app.runtime_services.hook_executor = Some(std::sync::Arc::new(app.hooks.clone())); } app.runtime_services = RuntimeToolServices { shell_manager: Some(shell_manager), @@ -8883,4 +8882,4 @@ fn parse_semver(v: &str) -> Option<(u32, u32, u32)> { } #[cfg(test)] -mod tests; \ No newline at end of file +mod tests; diff --git a/crates/tui/src/utils.rs b/crates/tui/src/utils.rs index 756c483d..3cb7972a 100644 --- a/crates/tui/src/utils.rs +++ b/crates/tui/src/utils.rs @@ -253,7 +253,7 @@ fn browser_open_command(url: &str) -> Result { { let mut cmd = Command::new("cmd"); cmd.args(["/C", "start", "", url]); - return Ok(cmd); + Ok(cmd) } #[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]