Skip to content

Commit

Permalink
Merge pull request #816 from gwenn/needless_lifetimes
Browse files Browse the repository at this point in the history
Fix clippy needless_lifetimes warnings
  • Loading branch information
gwenn authored Oct 11, 2024
2 parents 34edadd + cf5351b commit bc1667e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ impl<'out, 'prompt, H: Helper> State<'out, 'prompt, H> {
}
}

impl<'out, 'prompt, H: Helper> Invoke for State<'out, 'prompt, H> {
impl<H: Helper> Invoke for State<'_, '_, H> {
fn input(&self) -> &str {
self.line.as_str()
}
}

impl<'out, 'prompt, H: Helper> Refresher for State<'out, 'prompt, H> {
impl<H: Helper> Refresher for State<'_, '_, H> {
fn refresh_line(&mut self) -> Result<()> {
let prompt_size = self.prompt_size;
self.hint();
Expand Down Expand Up @@ -325,7 +325,7 @@ impl<'out, 'prompt, H: Helper> Refresher for State<'out, 'prompt, H> {
}
}

impl<'out, 'prompt, H: Helper> fmt::Debug for State<'out, 'prompt, H> {
impl<H: Helper> fmt::Debug for State<'_, '_, H> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("State")
.field("prompt", &self.prompt)
Expand All @@ -338,7 +338,7 @@ impl<'out, 'prompt, H: Helper> fmt::Debug for State<'out, 'prompt, H> {
}
}

impl<'out, 'prompt, H: Helper> State<'out, 'prompt, H> {
impl<H: Helper> State<'_, '_, H> {
pub fn clear_screen(&mut self) -> Result<()> {
self.out.clear_screen()?;
self.layout.cursor = Position::default();
Expand Down
2 changes: 1 addition & 1 deletion src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ impl<'b> InputState<'b> {
}

#[cfg(feature = "custom-bindings")]
impl<'b> InputState<'b> {
impl InputState<'_> {
/// Application customized binding
fn custom_binding(
&self,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ struct Iter<'a, H: Helper, I: History> {
prompt: &'a str,
}

impl<'a, H: Helper, I: History> Iterator for Iter<'a, H, I> {
impl<H: Helper, I: History> Iterator for Iter<'_, H, I> {
type Item = Result<String>;

fn next(&mut self) -> Option<Result<String>> {
Expand Down
2 changes: 1 addition & 1 deletion src/tty/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl RawMode for Mode {
}
}

impl<'a> RawReader for Iter<'a, KeyEvent> {
impl RawReader for Iter<'_, KeyEvent> {
type Buffer = Buffer;

fn wait_for_input(&mut self, single_esc_abort: bool) -> Result<Event> {
Expand Down

0 comments on commit bc1667e

Please sign in to comment.