Merge pull request #2741 from edwloef/click-kind-derive
derive PartialEq and Eq for `mouse::click::Kind`
This commit is contained in:
commit
1dccd1e71f
2 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ pub struct Click {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The kind of mouse click.
|
/// The kind of mouse click.
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum Kind {
|
pub enum Kind {
|
||||||
/// A single click
|
/// A single click
|
||||||
Single,
|
Single,
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ fn update<Message: Clone, Theme, Renderer>(
|
||||||
state.previous_click,
|
state.previous_click,
|
||||||
);
|
);
|
||||||
|
|
||||||
if matches!(new_click.kind(), mouse::click::Kind::Double) {
|
if new_click.kind() == mouse::click::Kind::Double {
|
||||||
shell.publish(message.clone());
|
shell.publish(message.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue