Avoid re-allocating KeymapContext
after every view notification
This commit is contained in:
parent
18e39ef2fa
commit
3d679ddb26
12 changed files with 74 additions and 75 deletions
|
@ -17,6 +17,11 @@ impl KeymapContext {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn clear(&mut self) {
|
||||
self.set.clear();
|
||||
self.map.clear();
|
||||
}
|
||||
|
||||
pub fn extend(&mut self, other: &Self) {
|
||||
for v in &other.set {
|
||||
self.set.insert(v.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue