去掉派生路径排除里的逐组件小写分配
project/filesystem.rs:派生目录判定改用 eq_ignore_ascii_case 原地比较,不再为每个路径组件分配一个新 String。
This commit is contained in:
@@ -421,10 +421,9 @@ pub(crate) fn should_skip_project_derived_path(relative_path: &str) -> bool {
|
||||
.split('/')
|
||||
.filter(|component| !component.is_empty())
|
||||
.any(|component| {
|
||||
let component = component.to_ascii_lowercase();
|
||||
PROJECT_DERIVED_EXCLUDED_COMPONENTS
|
||||
.iter()
|
||||
.any(|candidate| *candidate == component)
|
||||
.any(|candidate| component.eq_ignore_ascii_case(candidate))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user