From 63eb4ff9804c2a67cd3f297d9dbe1cb415a5fbb1 Mon Sep 17 00:00:00 2001 From: Test Date: Fri, 6 Mar 2026 16:11:57 +0100 Subject: [PATCH] fix: address clippy lints in title_case_folder Use char array pattern and function reference instead of closures. Co-Authored-By: Claude Opus 4.6 --- src-tauri/src/vault/parsing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/vault/parsing.rs b/src-tauri/src/vault/parsing.rs index 29c8ea4c..b89c372b 100644 --- a/src-tauri/src/vault/parsing.rs +++ b/src-tauri/src/vault/parsing.rs @@ -198,9 +198,9 @@ pub(super) fn capitalize_first(s: &str) -> String { /// Title-case a folder name: split on hyphens and underscores, capitalize each word, join with spaces. /// Example: "monday-ideas" → "Monday Ideas", "key_result" → "Key Result" pub(super) fn title_case_folder(s: &str) -> String { - s.split(|c| c == '-' || c == '_') + s.split(['-', '_']) .filter(|w| !w.is_empty()) - .map(|w| capitalize_first(w)) + .map(capitalize_first) .collect::>() .join(" ") }