Skip to content

Commit

Permalink
Fix clippy warnings (#718)
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
gwenn authored Jul 21, 2023
1 parent d94c2ff commit 934a7dc
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,7 @@ impl<'b> InputState<'b> {
}

/// Terminal peculiar binding
fn term_binding<R: RawReader>(
rdr: &mut R,
wrt: &mut dyn Refresher,
key: &KeyEvent,
) -> Option<Cmd> {
fn term_binding<R: RawReader>(rdr: &R, wrt: &dyn Refresher, key: &KeyEvent) -> Option<Cmd> {
let cmd = rdr.find_binding(key);
if cmd == Some(Cmd::EndOfFile) && !wrt.line().is_empty() {
None // ReadlineError::Eof only if line is empty
Expand Down Expand Up @@ -1008,7 +1004,7 @@ impl<'b> InputState<'b> {
fn common<R: RawReader>(
&mut self,
rdr: &mut R,
wrt: &mut dyn Refresher,
wrt: &dyn Refresher,
mut evt: Event,
key: KeyEvent,
n: RepeatCount,
Expand Down Expand Up @@ -1130,7 +1126,7 @@ impl<'b> InputState<'b> {
/// Application customized binding
fn custom_binding(
&self,
wrt: &mut dyn Refresher,
wrt: &dyn Refresher,
evt: &Event,
n: RepeatCount,
positive: bool,
Expand All @@ -1153,7 +1149,7 @@ impl<'b> InputState<'b> {
fn custom_seq_binding<R: RawReader>(
&self,
rdr: &mut R,
wrt: &mut dyn Refresher,
wrt: &dyn Refresher,
evt: &mut Event,
n: RepeatCount,
positive: bool,
Expand Down Expand Up @@ -1185,20 +1181,14 @@ impl<'b> InputState<'b> {

#[cfg(not(feature = "custom-bindings"))]
impl<'b> InputState<'b> {
fn custom_binding(
&self,
_: &mut dyn Refresher,
_: &Event,
_: RepeatCount,
_: bool,
) -> Option<Cmd> {
fn custom_binding(&self, _: &dyn Refresher, _: &Event, _: RepeatCount, _: bool) -> Option<Cmd> {
None
}

fn custom_seq_binding<R: RawReader>(
&self,
_: &mut R,
_: &mut dyn Refresher,
_: &dyn Refresher,
_: &mut Event,
_: RepeatCount,
_: bool,
Expand Down

0 comments on commit 934a7dc

Please sign in to comment.