Skip to content

Commit 8934ac5

Browse files
committed
add a comment for code that isn't
1 parent dda4d7b commit 8934ac5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/src/core/build_steps/format.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
214214
override_builder.add(&format!("/{file}")).expect(&file);
215215
}
216216
}
217-
Ok(None) => {}
217+
Ok(None) => {
218+
// NOTE: `Ok(None)` signifies that we need to format all files.
219+
// The tricky part here is that if `override_builder` isn't given any white
220+
// list files (i.e. files to be formatted, added without leading `!`), it
221+
// will instead look for *all* files. So, by doing nothing here, we are
222+
// actually making it so we format all files.
223+
}
218224
Err(err) => {
219225
eprintln!("fmt warning: Something went wrong running git commands:");
220226
eprintln!("fmt warning: {err}");

0 commit comments

Comments
 (0)