Skip to content

Commit fd1429a

Browse files
committed
replace manual verbose checks with Config::is_verbose
Signed-off-by: onur-ozkan <[email protected]>
1 parent 612796c commit fd1429a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/bootstrap/src/core/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1562,8 +1562,8 @@ impl<'a> Builder<'a> {
15621562
let libdir = self.rustc_libdir(compiler);
15631563

15641564
let sysroot_str = sysroot.as_os_str().to_str().expect("sysroot should be UTF-8");
1565-
if !matches!(self.config.dry_run, DryRun::SelfCheck) {
1566-
self.verbose_than(0, || println!("using sysroot {sysroot_str}"));
1565+
if self.is_verbose() && !matches!(self.config.dry_run, DryRun::SelfCheck) {
1566+
println!("using sysroot {sysroot_str}");
15671567
}
15681568

15691569
let mut rustflags = Rustflags::new(target);

src/bootstrap/src/core/config/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2428,7 +2428,7 @@ impl Config {
24282428

24292429
/// Runs a function if verbosity is greater than 0
24302430
pub fn verbose(&self, f: impl Fn()) {
2431-
if self.verbose > 0 {
2431+
if self.is_verbose() {
24322432
f()
24332433
}
24342434
}
@@ -2713,7 +2713,7 @@ impl Config {
27132713
.success();
27142714
if has_changes {
27152715
if if_unchanged {
2716-
if self.verbose > 0 {
2716+
if self.is_verbose() {
27172717
println!(
27182718
"WARNING: saw changes to compiler/ or library/ since {commit}; \
27192719
ignoring `download-rustc`"
@@ -2810,7 +2810,7 @@ impl Config {
28102810
let has_changes = !t!(git.as_command_mut().status()).success();
28112811
if has_changes {
28122812
if if_unchanged {
2813-
if self.verbose > 0 {
2813+
if self.is_verbose() {
28142814
println!(
28152815
"warning: saw changes to one of {modified_paths:?} since {commit}; \
28162816
ignoring `{option_name}`"

0 commit comments

Comments
 (0)