mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +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()
|
self.used()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.len() == 0
|
||||||
|
}
|
||||||
|
|
||||||
pub fn elems(&self) -> &[MapElem] {
|
pub fn elems(&self) -> &[MapElem] {
|
||||||
// SAFETY: `self.table` should always point to an array of `MapElem` of
|
// SAFETY: `self.table` should always point to an array of `MapElem` of
|
||||||
// `self.len()` items valid at least for the lifetime of `self`.
|
// `self.len()` items valid at least for the lifetime of `self`.
|
||||||
|
Loading…
Reference in New Issue
Block a user