autocommit 2022-02-15 22:53:12 CET
This commit is contained in:
parent
290225190a
commit
cacd49d15a
33 changed files with 884 additions and 220 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use std::cell::UnsafeCell;
|
||||
use crate::utils::ptr_ext::MutPtrExt;
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
pub struct Stack<T> {
|
||||
vec: UnsafeCell<Vec<T>>,
|
||||
|
|
@ -21,8 +21,6 @@ impl<T> Stack<T> {
|
|||
}
|
||||
|
||||
pub fn pop(&self) -> Option<T> {
|
||||
unsafe {
|
||||
self.vec.get().deref_mut().pop()
|
||||
}
|
||||
unsafe { self.vec.get().deref_mut().pop() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue