Skip to content

Commit

Permalink
address rust 1.61.0 clippy lints (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored May 20, 2022
1 parent 9be810f commit e04bb8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,11 +1225,11 @@ fn replace(cx: &mut Context) {
// need to wait for next key
cx.on_next_key(move |cx, event| {
let (view, doc) = current!(cx.editor);
let ch = match event {
let ch: Option<&str> = match event {
KeyEvent {
code: KeyCode::Char(ch),
..
} => Some(&ch.encode_utf8(&mut buf[..])[..]),
} => Some(ch.encode_utf8(&mut buf[..])),
KeyEvent {
code: KeyCode::Enter,
..
Expand Down
1 change: 1 addition & 0 deletions helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ impl<T> Picker<T> {
);
} else if pattern.starts_with(&self.previous_pattern) {
// TODO: remove when retain_mut is in stable rust
#[allow(unused_imports)]
use retain_mut::RetainMut;

// optimization: if the pattern is a more specific version of the previous one
Expand Down

0 comments on commit e04bb8b

Please sign in to comment.