Skip to content

Commit

Permalink
fix: clippy issues fix in the cli_loop module
Browse files Browse the repository at this point in the history
  • Loading branch information
therustmonk committed Mar 22, 2022
1 parent 3ccea96 commit 1a69a79
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions applications/tari_base_node/src/commands/cli_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ impl CliLoop {
}
}

fn is_interruption(&mut self, event: Option<Result<Event, io::Error>>) -> bool {
match event {
Some(Ok(Event::Key(key))) => match key {
fn is_interrupted(&mut self, event: Option<Result<Event, io::Error>>) -> bool {
if let Some(Ok(Event::Key(key))) = event {
match key {
KeyEvent {
code: KeyCode::Char('c'),
modifiers: KeyModifiers::CONTROL,
Expand All @@ -103,8 +103,7 @@ impl CliLoop {
println!("Press Ctrl-C to enter the interactive shell.");
}
},
},
_ => {},
}
}
false
}
Expand Down Expand Up @@ -138,7 +137,7 @@ impl CliLoop {
break;
}
event = events.next() => {
if self.is_interruption(event) {
if self.is_interrupted(event) {
break;
}
}
Expand Down

0 comments on commit 1a69a79

Please sign in to comment.