on master help sign in
address rust 1.61.0 clippy lints (#2514)
commite04bb8b8915bfe1df1a5ee7a8750f2589f2aae06 authorMichael Davis <mcarsondavis@gmail.com> dateThu 19 May 2022, 22:16 (4 years ago) parent9be810f
2 files changed+3−2
helix-term/src/commands.rs+2−2 helix-term/src/ui/picker.rs+1
helix-term/src/commands.rs+2−2
@@ -1225,11 +1225,11 @@ fn replace(cx: &mut Context) {
12251225 // need to wait for next key
12261226 cx.on_next_key(move |cx, event| {
12271227 let (view, doc) = current!(cx.editor);
1228− let ch = match event {
1228+ let ch: Option<&str> = match event {
12291229 KeyEvent {
12301230 code: KeyCode::Char(ch),
12311231 ..
1232− } => Some(&ch.encode_utf8(&mut buf[..])[..]),
1232+ } => Some(ch.encode_utf8(&mut buf[..])),
12331233 KeyEvent {
12341234 code: KeyCode::Enter,
12351235 ..
helix-term/src/ui/picker.rs+1
@@ -366,6 +366,7 @@ impl<T> Picker<T> {
366366 );
367367 } else if pattern.starts_with(&self.previous_pattern) {
368368 // TODO: remove when retain_mut is in stable rust
369+ #[allow(unused_imports)]
369370 use retain_mut::RetainMut;
370371
371372 // optimization: if the pattern is a more specific version of the previous one