address rust 1.61.0 clippy lints (#2514)
This commit is contained in:
parent
9be810fd01
commit
e04bb8b891
2 changed files with 3 additions and 2 deletions
|
@ -1225,11 +1225,11 @@ fn replace(cx: &mut Context) {
|
||||||
// need to wait for next key
|
// need to wait for next key
|
||||||
cx.on_next_key(move |cx, event| {
|
cx.on_next_key(move |cx, event| {
|
||||||
let (view, doc) = current!(cx.editor);
|
let (view, doc) = current!(cx.editor);
|
||||||
let ch = match event {
|
let ch: Option<&str> = match event {
|
||||||
KeyEvent {
|
KeyEvent {
|
||||||
code: KeyCode::Char(ch),
|
code: KeyCode::Char(ch),
|
||||||
..
|
..
|
||||||
} => Some(&ch.encode_utf8(&mut buf[..])[..]),
|
} => Some(ch.encode_utf8(&mut buf[..])),
|
||||||
KeyEvent {
|
KeyEvent {
|
||||||
code: KeyCode::Enter,
|
code: KeyCode::Enter,
|
||||||
..
|
..
|
||||||
|
|
|
@ -366,6 +366,7 @@ impl<T> Picker<T> {
|
||||||
);
|
);
|
||||||
} else if pattern.starts_with(&self.previous_pattern) {
|
} else if pattern.starts_with(&self.previous_pattern) {
|
||||||
// TODO: remove when retain_mut is in stable rust
|
// TODO: remove when retain_mut is in stable rust
|
||||||
|
#[allow(unused_imports)]
|
||||||
use retain_mut::RetainMut;
|
use retain_mut::RetainMut;
|
||||||
|
|
||||||
// optimization: if the pattern is a more specific version of the previous one
|
// optimization: if the pattern is a more specific version of the previous one
|
||||||
|
|
Loading…
Reference in a new issue