From 946da4bb0f3a1e34548a577438a6f58533a918ce Mon Sep 17 00:00:00 2001 From: Matias Galarza Date: Mon, 20 Apr 2026 09:50:02 -0300 Subject: [PATCH] fix(file-ops): use sort_by_key to satisfy clippy 1.95 unnecessary_sort_by lint clippy 1.95 introduced `unnecessary_sort_by`, flagging the existing `sort_by` call in browse.rs as replaceable with the lighter `sort_by_key`. With `-D warnings` in CI this broke every PR against development once GitHub runners updated to Rust 1.95 stable. The suggested rewrite is semantically identical: both sort case-insensitively by entry name. --- crates/file-ops/src/browse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/file-ops/src/browse.rs b/crates/file-ops/src/browse.rs index 1bb5cab8..d019115e 100644 --- a/crates/file-ops/src/browse.rs +++ b/crates/file-ops/src/browse.rs @@ -56,7 +56,7 @@ pub fn list_directory(path: &Path) -> Result, String> { }) .collect(); - result.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); + result.sort_by_key(|entry| entry.name.to_lowercase()); Ok(result) }