From 01792afea745e9a66047eccea7cc1a8c17697a34 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 12 May 2026 15:11:04 +0200 Subject: [PATCH] Apply suggestions from clippy 1.95 --- src/windows_term/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/windows_term/mod.rs b/src/windows_term/mod.rs index eddbe0da..ab12b4e2 100644 --- a/src/windows_term/mod.rs +++ b/src/windows_term/mod.rs @@ -410,11 +410,9 @@ pub(crate) fn read_secure() -> io::Result { Key::Enter => { break; } - Key::Char('\x08') => { - if !rv.is_empty() { - let new_len = rv.len() - 1; - rv.truncate(new_len); - } + Key::Char('\x08') if !rv.is_empty() => { + let new_len = rv.len() - 1; + rv.truncate(new_len); } Key::Char(c) => { rv.push(c);