diff --git a/core/embed/rust/src/micropython/map.rs b/core/embed/rust/src/micropython/map.rs index e889c250a..51789abd4 100644 --- a/core/embed/rust/src/micropython/map.rs +++ b/core/embed/rust/src/micropython/map.rs @@ -69,6 +69,10 @@ impl Map { self.used() } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn elems(&self) -> &[MapElem] { // SAFETY: `self.table` should always point to an array of `MapElem` of // `self.len()` items valid at least for the lifetime of `self`.