mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
feat(core/rust): add Map::is_empty()
This commit is contained in:
parent
9c72c7c99d
commit
63360a7417
@ -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`.
|
||||
|
Loading…
Reference in New Issue
Block a user