mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Add a 'clear' method to map.
This commit is contained in:
parent
5c1c786e35
commit
4e2440daec
@ -37,6 +37,11 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Clears the map. Keeps the allocated memory for future use.
|
||||
pub fn clear(&mut self) {
|
||||
self.elems.clear();
|
||||
}
|
||||
|
||||
/// Returns the size of this map.
|
||||
pub fn len(&self) -> usize {
|
||||
self.elems.len()
|
||||
|
Loading…
Reference in New Issue
Block a user