1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-29 16:51:30 +00:00

feat(core/rust): make ButtonPos hit function public to enable reuse

This commit is contained in:
tychovrahe 2022-06-02 22:00:13 +02:00 committed by TychoVrahe
parent f538547d5b
commit ce142ffe08

View File

@ -18,7 +18,7 @@ pub enum ButtonPos {
}
impl ButtonPos {
fn hit(&self, b: &PhysicalButton) -> bool {
pub fn hit(&self, b: &PhysicalButton) -> bool {
matches!(
(self, b),
(Self::Left, PhysicalButton::Left) | (Self::Right, PhysicalButton::Right)