Skip to content

Commit

Permalink
Fix clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Oct 30, 2023
1 parent 091afc7 commit 0745f64
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,25 +737,21 @@ impl Reedline {
..
}) => {
let enter = ReedlineRawEvent::convert_from(enter);
match enter {
Some(enter) => {
crossterm_events.push(enter);
// Break early to check if the input is complete and
// can be send to the hosting application. If
// multiple complete entries are submitted, events
// are still in the crossterm queue for us to
// process.
paste_enter_state = crossterm_events.len() > EVENTS_THRESHOLD;
break;
}
None => (),
if let Some(enter) = enter {
crossterm_events.push(enter);
// Break early to check if the input is complete and
// can be send to the hosting application. If
// multiple complete entries are submitted, events
// are still in the crossterm queue for us to
// process.
paste_enter_state = crossterm_events.len() > EVENTS_THRESHOLD;
break;

Check warning on line 748 in src/engine.rs

View check run for this annotation

Codecov / codecov/patch

src/engine.rs#L730-L748

Added lines #L730 - L748 were not covered by tests
}
}
x => {
let raw_event = ReedlineRawEvent::convert_from(x);
match raw_event {
Some(evt) => crossterm_events.push(evt),
None => (),
if let Some(evt) = raw_event {
crossterm_events.push(evt);

Check warning on line 754 in src/engine.rs

View check run for this annotation

Codecov / codecov/patch

src/engine.rs#L751-L754

Added lines #L751 - L754 were not covered by tests
}
}
}
Expand Down

0 comments on commit 0745f64

Please sign in to comment.