mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-12-01 19:58:12 +03:00
Simplify BTreeSet construction
Co-authored-by: Ivan Tham <pickfire@riseup.net>
This commit is contained in:
parent
eb8745db09
commit
7a0c4322ea
@ -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)| {
|
||||
|
Loading…
Reference in New Issue
Block a user