Make SanitizedPath wrap Path instead of Arc<Path> to avoid allocation (#37106)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2025-08-28 13:32:30 -06:00
committed by GitHub
parent 69933d5b81
commit 47aaaa8bcf
14 changed files with 156 additions and 85 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ impl PathList {
let mut indexed_paths: Vec<(usize, PathBuf)> = paths
.iter()
.enumerate()
.map(|(ix, path)| (ix, SanitizedPath::from(path).into()))
.map(|(ix, path)| (ix, SanitizedPath::new(path).into()))
.collect();
indexed_paths.sort_by(|(_, a), (_, b)| a.cmp(b));
let order = indexed_paths.iter().map(|e| e.0).collect::<Vec<_>>().into();