mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-30 17:21:21 +00:00
feat(core/rust): make ButtonPos hit function public to enable reuse
This commit is contained in:
parent
f538547d5b
commit
ce142ffe08
@ -18,7 +18,7 @@ pub enum ButtonPos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ButtonPos {
|
impl ButtonPos {
|
||||||
fn hit(&self, b: &PhysicalButton) -> bool {
|
pub fn hit(&self, b: &PhysicalButton) -> bool {
|
||||||
matches!(
|
matches!(
|
||||||
(self, b),
|
(self, b),
|
||||||
(Self::Left, PhysicalButton::Left) | (Self::Right, PhysicalButton::Right)
|
(Self::Left, PhysicalButton::Left) | (Self::Right, PhysicalButton::Right)
|
||||||
|
Loading…
Reference in New Issue
Block a user