From 440ea3751ff08fdd56f96d0a8dfdb4975fc974a3 Mon Sep 17 00:00:00 2001 From: Frank O'Hara Date: Tue, 14 Jul 2026 09:10:34 -0600 Subject: [PATCH] Fix remaining clippy 1.97 lints in lash-cli/lash-tui CI's stable clippy (1.97) flags useless_borrows_in_formatting and assert!-with-equality across tests and a TUI format! call that older clippy did not. Drop the redundant & in two format args and switch three assert!(a == b)/(a != b) test lines to assert_eq!/assert_ne!. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/lash-cli/src/commands/check_links/core.rs | 4 ++-- crates/lash-cli/src/utils/file_discovery.rs | 6 +++--- crates/lash-tui/src/ui/filter_modal.rs | 2 +- crates/lash-tui/tests/integration_test.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/lash-cli/src/commands/check_links/core.rs b/crates/lash-cli/src/commands/check_links/core.rs index 9eb88d2..e63d62d 100644 --- a/crates/lash-cli/src/commands/check_links/core.rs +++ b/crates/lash-cli/src/commands/check_links/core.rs @@ -926,8 +926,8 @@ mod tests { // These two must produce different behavior in output_text_report assert_eq!(empty_report.total_broken, 0); assert_ne!(non_empty_report.total_broken, 0); - assert!(empty_report.total_broken == 0); - assert!(non_empty_report.total_broken != 0); + assert_eq!(empty_report.total_broken, 0); + assert_ne!(non_empty_report.total_broken, 0); } // Kill mut-000243/244/245: total_broken == 0 is the exact early-return boundary. diff --git a/crates/lash-cli/src/utils/file_discovery.rs b/crates/lash-cli/src/utils/file_discovery.rs index a0a18f8..e56742e 100644 --- a/crates/lash-cli/src/utils/file_discovery.rs +++ b/crates/lash-cli/src/utils/file_discovery.rs @@ -138,9 +138,9 @@ mod tests { assert_eq!(files.len(), 3); // Check that files are sorted - assert!(files[0].file_name().unwrap() == "one.md"); - assert!(files[1].file_name().unwrap() == "three.md"); - assert!(files[2].file_name().unwrap() == "two.md"); + assert_eq!(files[0].file_name().unwrap(), "one.md"); + assert_eq!(files[1].file_name().unwrap(), "three.md"); + assert_eq!(files[2].file_name().unwrap(), "two.md"); Ok(()) } diff --git a/crates/lash-tui/src/ui/filter_modal.rs b/crates/lash-tui/src/ui/filter_modal.rs index ebd7e28..23ebd4b 100644 --- a/crates/lash-tui/src/ui/filter_modal.rs +++ b/crates/lash-tui/src/ui/filter_modal.rs @@ -179,7 +179,7 @@ fn render_label_list( }, // Label name Span::styled( - format!("#{}", &label.name), + format!("#{}", label.name), Style::default().fg(theme.label_color()), ), // Spacing diff --git a/crates/lash-tui/tests/integration_test.rs b/crates/lash-tui/tests/integration_test.rs index 573e6e0..dbd9dbe 100644 --- a/crates/lash-tui/tests/integration_test.rs +++ b/crates/lash-tui/tests/integration_test.rs @@ -152,7 +152,7 @@ fn test_state_file_tree_contains_description() -> TuiResult<()> { eprintln!( "Direct file description len: {} content: '{}'", test_file_direct.description.len(), - &test_file_direct.description + test_file_direct.description ); assert!( !test_file_direct.description.is_empty(),