aboutsummaryrefslogtreecommitdiffstats
path: root/src/ansi/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ansi/mod.rs')
-rw-r--r--src/ansi/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ansi/mod.rs b/src/ansi/mod.rs
index 020713a..7a38ae4 100644
--- a/src/ansi/mod.rs
+++ b/src/ansi/mod.rs
@@ -24,10 +24,10 @@ pub fn read(debug: bool) -> Option<KbInput<'static>> {
}
println!("{}\r", kb.as_bytes().escape_ascii());
}
- if let KbInput::InvalidEscape(x) = &kb {
- if x.len() == 1 {
- break Some(KbInput::Key([x[0]]));
- }
+ if let KbInput::InvalidEscape(x) = &kb
+ && x.len() == 1
+ {
+ break Some(KbInput::Key([x[0]]));
}
break Some(kb);
}
@@ -172,7 +172,7 @@ fn trie_from_words(words: Vec<(&'static str, &[u8])>) -> EscapeTrie {
let mut all_empty = true;
for (key, val) in words.iter() {
- if let Some(byte) = val.get(0) {
+ if let Some(byte) = val.first() {
all_empty = false;
tree.entry(byte)
.or_insert_with(Vec::new)