Make user feedback fields private

This commit is contained in:
Julien Cretin
2022-03-02 17:42:30 +01:00
parent 7d39d4e2e8
commit 5c59e809c2
4 changed files with 25 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ pub struct CtapHid {
// In packets, the ID encoding is Big Endian to match what is used throughout CTAP (with the
// u32::to/from_be_bytes methods).
allocated_cids: usize,
pub wink_permission: TimedPermission,
pub(crate) wink_permission: TimedPermission,
}
#[allow(dead_code)]
@@ -399,6 +399,10 @@ impl CtapHid {
.unwrap()
}
pub fn should_wink(&self, now: ClockValue) -> bool {
self.wink_permission.is_granted(now)
}
#[cfg(feature = "with_ctap1")]
fn ctap1_error_message(
cid: ChannelID,