We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da22db6 commit 8300ecaCopy full SHA for 8300eca
src/tools/tidy/src/walk.rs
@@ -95,9 +95,15 @@ pub(crate) fn walk_no_read(
95
f: &mut dyn FnMut(&DirEntry),
96
) {
97
let include_untracked = tidy_ctx.map(|flags| flags.include_untracked).unwrap_or(false);
98
- let untracked_files = match !include_untracked {
99
- true => tidy_ctx.unwrap().untracked_files.clone(),
100
- false => HashSet::new(),
+ let untracked_files = match include_untracked {
+ true => HashSet::new(),
+ false => {
101
+ if let Some(ctx) = tidy_ctx {
102
+ ctx.untracked_files.clone()
103
+ } else {
104
+ HashSet::new()
105
+ }
106
107
};
108
109
let mut walker = ignore::WalkBuilder::new(paths[0]);
0 commit comments