aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorMichael Davis2022-05-20 03:16:11 +0000
committerGitHub2022-05-20 03:16:11 +0000
commite04bb8b8915bfe1df1a5ee7a8750f2589f2aae06 (patch)
tree5482270ef61d03da1d218caacc4dcc1ee174635d /helix-term/src/commands.rs
parent9be810fd01f495c795ab5e5b7240a32708d19f5c (diff)
address rust 1.61.0 clippy lints (#2514)
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 855f2d7d..c3c7d224 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -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,
..