Skip to content

Commit

Permalink
address Windows-specific feedback from Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
apparebit committed Nov 13, 2024
1 parent 35a405d commit abbe186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/term/sys/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ impl Config {
& Console::ENABLE_VIRTUAL_TERMINAL_PROCESSING;

// If the update fails, try to restore old configuration.
this.update(new_input_mode, new_output_mode).or_else(|e| {
this.restore();
Err(e)
this.update(new_input_mode, new_output_mode).map_err(|e| {
let _ = this.restore();
e
})?;

Ok(this)
Expand Down

0 comments on commit abbe186

Please sign in to comment.