aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorTriton1712021-11-02 16:43:07 +0000
committerBlaž Hrastnik2021-11-03 02:56:55 +0000
commit7a0c4322eaeef7325878abe9a99adde4ad905f5e (patch)
tree694849bf04f9a5ca37436f3660111b9cd24b6728 /helix-term
parenteb8745db0999a50464ac183baa138c4e511430f2 (diff)
Simplify BTreeSet construction
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/keymap.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index 827f71d9..72d0a733 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -147,11 +147,7 @@ impl KeyTrieNode {
Some(pos) => {
body[pos].1.insert(key);
}
- None => {
- let mut keys = BTreeSet::new();
- keys.insert(key);
- body.push((desc, keys));
- }
+ None => body.push((desc, BTreeSet::from([key]))),
}
}
body.sort_unstable_by_key(|(_, keys)| {