Impl binstall_v1::Records::{len, is_empty}

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-27 22:31:51 +10:00
parent 8ec33c5b6c
commit e6ee493771
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -189,6 +189,14 @@ impl Records {
pub fn take(&mut self, value: impl AsRef<str>) -> Option<MetaData> {
self.data.take(value.as_ref())
}
pub fn len(&self) -> usize {
self.data.len()
}
pub fn is_empty(&self) -> bool {
self.data.is_empty()
}
}
impl<'a> IntoIterator for &'a Records {