autocommit 2022-04-17 18:45:01 CEST
This commit is contained in:
parent
1eb0d3e173
commit
affab05b94
7 changed files with 114 additions and 15 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::mem;
|
||||
use {
|
||||
crate::utils::ptr_ext::{MutPtrExt, PtrExt},
|
||||
std::cell::UnsafeCell,
|
||||
|
|
@ -35,4 +36,10 @@ impl<T> Stack<T> {
|
|||
(*v).clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take(&self) -> Vec<T> {
|
||||
unsafe {
|
||||
mem::take(self.vec.get().deref_mut())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue