commit rustfmt stump in x t tidy even on check

If checking succeeded, it's equivalent to successfully formatting.
This commit is contained in:
Waffle Lapkin 2025-04-15 14:06:51 +02:00
parent 8934ac5759
commit 90aec13674
No known key found for this signature in database

View File

@ -336,7 +336,10 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
crate::exit!(1);
}
if !check {
update_rustfmt_version(build);
}
// Update `build/.rustfmt-stamp`, allowing this code to ignore files which have not been changed
// since last merge.
//
// NOTE: Because of the exit above, this is only reachable if formatting / format checking
// succeeded. So we are not commiting the version if formatting was not good.
update_rustfmt_version(build);
}