summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5eb4439..fc92c3a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -127,6 +127,12 @@ where
self.capacity
}
+ /// Returns whether this `MultiVec` is empty.
+ pub fn is_empty(&self) -> bool
+ {
+ self.length == 0
+ }
+
fn grow_amortized(&mut self, additional: usize)
{
let required_cap = self.capacity.checked_add(additional).unwrap();