Do not clone Key
This commit is contained in:
parent
2688dd0d88
commit
ae2d49d711
3 changed files with 19 additions and 19 deletions
|
|
@ -22,8 +22,8 @@ pub struct KeyBind {
|
|||
}
|
||||
|
||||
impl KeyBind {
|
||||
pub fn matches(&self, modifiers: Modifiers, key: Key) -> bool {
|
||||
self.key == key
|
||||
pub fn matches(&self, modifiers: Modifiers, key: &Key) -> bool {
|
||||
key == &self.key
|
||||
&& modifiers.logo() == self.modifiers.contains(&Modifier::Super)
|
||||
&& modifiers.control() == self.modifiers.contains(&Modifier::Ctrl)
|
||||
&& modifiers.alt() == self.modifiers.contains(&Modifier::Alt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue