Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warnings #718

Merged
merged 4 commits into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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