on master help sign in
address rust 1.61.0 clippy lints (#2514)
e04bb8bMichael Davis
helix-term/src/commands.rs+2−2
@@ -1225,11 +1225,11 @@ fn replace(cx: &mut Context) {
1225 // need to wait for next key
1225 // need to wait for next key
1226 cx.on_next_key(move |cx, event| {
1226 cx.on_next_key(move |cx, event| {
1227 let (view, doc) = current!(cx.editor);
1227 let (view, doc) = current!(cx.editor);
1228− let ch = match event {
1228+ let ch: Option<&str> = match event {
1229 KeyEvent {
1229 KeyEvent {
1230 code: KeyCode::Char(ch),
1230 code: KeyCode::Char(ch),
1231 ..
1231 ..
1232− } => Some(&ch.encode_utf8(&mut buf[..])[..]),
1232+ } => Some(ch.encode_utf8(&mut buf[..])),
1233 KeyEvent {
1233 KeyEvent {
1234 code: KeyCode::Enter,
1234 code: KeyCode::Enter,
1235 ..
1235 ..
helix-term/src/ui/picker.rs+1
@@ -366,6 +366,7 @@ impl<T> Picker<T> {
366 );
366 );
367 } else if pattern.starts_with(&self.previous_pattern) {
367 } else if pattern.starts_with(&self.previous_pattern) {
368 // TODO: remove when retain_mut is in stable rust
368 // TODO: remove when retain_mut is in stable rust
369+ #[allow(unused_imports)]
369 use retain_mut::RetainMut;
370 use retain_mut::RetainMut;
370
371
371 // optimization: if the pattern is a more specific version of the previous one
372 // optimization: if the pattern is a more specific version of the previous one