Skip to content

Commit

Permalink
Follow the recommendations by Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
grahnen committed Dec 11, 2024
1 parent 2eec6fb commit 9fd162d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ pub fn run_elan(ctx: &ExecutionContext) -> Result<()> {
ExecutorOutput::Wet(command_output) => {
if command_output.status.success() {
// Flush the captured output
std::io::stdout().lock().write(&command_output.stdout).unwrap();
std::io::stderr().lock().write(&command_output.stderr).unwrap();
std::io::stdout().lock().write_all(&command_output.stdout).unwrap();
std::io::stderr().lock().write_all(&command_output.stderr).unwrap();
} else {
let stderr_as_str = std::str::from_utf8(&command_output.stderr).unwrap();
if stderr_as_str.contains(disabled_error_msg) {
Expand All @@ -277,8 +277,8 @@ pub fn run_elan(ctx: &ExecutionContext) -> Result<()> {
// `elan` is NOT externally managed, `elan self update` can
// be performed, but the invocation failed, so we report the
// error to the user and error out.
std::io::stdout().lock().write(&command_output.stdout).unwrap();
std::io::stderr().lock().write(&command_output.stderr).unwrap();
std::io::stdout().lock().write_all(&command_output.stdout).unwrap();
std::io::stderr().lock().write_all(&command_output.stderr).unwrap();

return Err(StepFailed.into());
}
Expand Down

0 comments on commit 9fd162d

Please sign in to comment.