Remove verbose_than function

This commit is contained in:
Jakub Beránek 2025-09-25 18:12:39 +02:00
parent 7cfd7d328b
commit 5595f437c7
No known key found for this signature in database
GPG Key ID: 909CD0D26483516B
2 changed files with 5 additions and 15 deletions

View File

@ -1902,12 +1902,7 @@ impl Step for Sysroot {
if !path.parent().is_none_or(|p| p.ends_with(&suffix)) {
return true;
}
if !filtered_files.iter().all(|f| f != path.file_name().unwrap()) {
builder.verbose_than(1, || println!("ignoring {}", path.display()));
false
} else {
true
}
filtered_files.iter().all(|f| f != path.file_name().unwrap())
});
}

View File

@ -1092,13 +1092,6 @@ impl Build {
self.verbosity > level
}
/// Runs a function if verbosity is greater than `level`.
fn verbose_than(&self, level: usize, f: impl Fn()) {
if self.is_verbose_than(level) {
f()
}
}
fn info(&self, msg: &str) {
match self.config.get_dry_run() {
DryRun::SelfCheck => (),
@ -1816,7 +1809,6 @@ impl Build {
if self.config.dry_run() {
return;
}
self.verbose_than(1, || println!("Copy/Link {src:?} to {dst:?}"));
if src == dst {
return;
}
@ -1933,7 +1925,10 @@ impl Build {
return;
}
let dst = dstdir.join(src.file_name().unwrap());
self.verbose_than(1, || println!("Install {src:?} to {dst:?}"));
#[cfg(feature = "tracing")]
let _span = trace_io!("install", ?src, ?dst);
t!(fs::create_dir_all(dstdir));
if !src.exists() {
panic!("ERROR: File \"{}\" not found!", src.display());