summaryrefslogtreecommitdiff
path: root/crates/utils/string_proc/src
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-11-23 15:16:55 +0800
committer魏曹先生 <1992414357@qq.com>2025-11-23 15:16:55 +0800
commitc1a50fbdddc5fad986f4b3b6310cc5167e68f87e (patch)
treea7b8b62691a0eefdffd5e25f59941c12a70efb04 /crates/utils/string_proc/src
parentbe76a48b6b53756fe1ba2f2ddd44bc14c9eb35bb (diff)
Apply clippy suggestions
Diffstat (limited to 'crates/utils/string_proc/src')
-rw-r--r--crates/utils/string_proc/src/format_path.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/utils/string_proc/src/format_path.rs b/crates/utils/string_proc/src/format_path.rs
index a3493f5..152b791 100644
--- a/crates/utils/string_proc/src/format_path.rs
+++ b/crates/utils/string_proc/src/format_path.rs
@@ -1,4 +1,4 @@
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
/// Format path str
pub fn format_path_str(path: impl Into<String>) -> Result<String, std::io::Error> {
@@ -42,7 +42,7 @@ pub fn format_path_str(path: impl Into<String>) -> Result<String, std::io::Error
}
/// Normalize path by resolving ".." components without requiring file system access
-fn normalize_path(path: &PathBuf) -> PathBuf {
+fn normalize_path(path: &Path) -> PathBuf {
let mut components = Vec::new();
for component in path.components() {