mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-04 11:10:02 +00:00
Impl binstall_v1::Records::{len, is_empty}
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
8ec33c5b6c
commit
e6ee493771
1 changed files with 8 additions and 0 deletions
|
@ -189,6 +189,14 @@ impl Records {
|
||||||
pub fn take(&mut self, value: impl AsRef<str>) -> Option<MetaData> {
|
pub fn take(&mut self, value: impl AsRef<str>) -> Option<MetaData> {
|
||||||
self.data.take(value.as_ref())
|
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 {
|
impl<'a> IntoIterator for &'a Records {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue