Skip to content

Commit 3fe4d13

Browse files
committed
Appease clippy
1 parent c152934 commit 3fe4d13

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,7 @@ impl Step for ErrorIndex {
23202320
builder.msg(Kind::Test, compiler.stage, "error-index", compiler.host, compiler.host);
23212321
let _time = helpers::timeit(builder);
23222322
builder
2323-
.run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::PrintOnFailure));
2323+
.run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::OnlyOnFailure));
23242324
drop(guard);
23252325
// The tests themselves need to link to std, so make sure it is
23262326
// available.

src/bootstrap/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ impl Build {
585585
BootstrapCommand::from(submodule_git().args(["diff-index", "--quiet", "HEAD"]))
586586
.allow_failure()
587587
.output_mode(match self.is_verbose() {
588-
true => OutputMode::PrintAll,
589-
false => OutputMode::PrintOutput,
588+
true => OutputMode::All,
589+
false => OutputMode::OnlyOutput,
590590
}),
591591
);
592592
if has_local_modifications {
@@ -967,15 +967,15 @@ impl Build {
967967
self.verbose(|| println!("running: {command:?}"));
968968

969969
let output_mode = command.output_mode.unwrap_or_else(|| match self.is_verbose() {
970-
true => OutputMode::PrintAll,
971-
false => OutputMode::PrintOutput,
970+
true => OutputMode::All,
971+
false => OutputMode::OnlyOutput,
972972
});
973973
let (output, print_error): (io::Result<CommandOutput>, bool) = match output_mode {
974-
mode @ (OutputMode::PrintAll | OutputMode::PrintOutput) => (
974+
mode @ (OutputMode::All | OutputMode::OnlyOutput) => (
975975
command.command.status().map(|status| status.into()),
976-
matches!(mode, OutputMode::PrintAll),
976+
matches!(mode, OutputMode::All),
977977
),
978-
OutputMode::PrintOnFailure => (command.command.output().map(|o| o.into()), true),
978+
OutputMode::OnlyOnFailure => (command.command.output().map(|o| o.into()), true),
979979
};
980980

981981
let output = match output {
@@ -1026,8 +1026,8 @@ impl Build {
10261026
fn run(&self, cmd: &mut Command) {
10271027
self.run_cmd(BootstrapCommand::from(cmd).fail_fast().output_mode(
10281028
match self.is_verbose() {
1029-
true => OutputMode::PrintAll,
1030-
false => OutputMode::PrintOutput,
1029+
true => OutputMode::All,
1030+
false => OutputMode::OnlyOutput,
10311031
},
10321032
));
10331033
}

src/bootstrap/src/utils/exec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ pub enum BehaviorOnFailure {
1616
pub enum OutputMode {
1717
/// Print both the output (by inheriting stdout/stderr) and also the command itself, if it
1818
/// fails.
19-
PrintAll,
19+
All,
2020
/// Print the output (by inheriting stdout/stderr).
21-
PrintOutput,
21+
OnlyOutput,
2222
/// Suppress the output if the command succeeds, otherwise print the output.
23-
PrintOnFailure,
23+
OnlyOnFailure,
2424
}
2525

2626
/// Wrapper around `std::process::Command`.
@@ -46,7 +46,7 @@ impl<'a> BootstrapCommand<'a> {
4646

4747
/// Do not print the output of the command, unless it fails.
4848
pub fn quiet(self) -> Self {
49-
self.output_mode(OutputMode::PrintOnFailure)
49+
self.output_mode(OutputMode::OnlyOnFailure)
5050
}
5151

5252
pub fn output_mode(self, output_mode: OutputMode) -> Self {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy