eventfd-cache: add new util
This commit is contained in:
parent
19edb3ea95
commit
80a69ba7ef
7 changed files with 240 additions and 0 deletions
|
|
@ -42,4 +42,9 @@ impl<T> Stack<T> {
|
|||
pub fn take(&self) -> Vec<T> {
|
||||
unsafe { mem::take(self.vec.get().deref_mut()) }
|
||||
}
|
||||
|
||||
#[cfg_attr(not(test), expect(dead_code))]
|
||||
pub fn len(&self) -> usize {
|
||||
unsafe { self.vec.get().deref().len() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue