Re-format let-else per rustfmt update
This commit is contained in:
parent
67b0cfc761
commit
cc907f80b9
162 changed files with 1404 additions and 947 deletions
|
|
@ -26,7 +26,9 @@ impl Step for CleanAll {
|
|||
}
|
||||
|
||||
fn run(self, builder: &Builder<'_>) -> Self::Output {
|
||||
let Subcommand::Clean { all, .. } = builder.config.cmd else { unreachable!("wrong subcommand?") };
|
||||
let Subcommand::Clean { all, .. } = builder.config.cmd else {
|
||||
unreachable!("wrong subcommand?")
|
||||
};
|
||||
clean_default(builder.build, all)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,13 +66,17 @@ fn get_rustfmt_version(build: &Builder<'_>) -> Option<(String, PathBuf)> {
|
|||
|
||||
/// Return whether the format cache can be reused.
|
||||
fn verify_rustfmt_version(build: &Builder<'_>) -> bool {
|
||||
let Some((version, stamp_file)) = get_rustfmt_version(build) else {return false;};
|
||||
let Some((version, stamp_file)) = get_rustfmt_version(build) else {
|
||||
return false;
|
||||
};
|
||||
!program_out_of_date(&stamp_file, &version)
|
||||
}
|
||||
|
||||
/// Updates the last rustfmt version used
|
||||
fn update_rustfmt_version(build: &Builder<'_>) {
|
||||
let Some((version, stamp_file)) = get_rustfmt_version(build) else {return;};
|
||||
let Some((version, stamp_file)) = get_rustfmt_version(build) else {
|
||||
return;
|
||||
};
|
||||
t!(std::fs::write(stamp_file, version))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue