1
0
Fork 0
forked from wry/wry

autocommit 2022-04-17 18:45:01 CEST

This commit is contained in:
Julian Orth 2022-04-17 18:45:01 +02:00
parent 1eb0d3e173
commit affab05b94
7 changed files with 114 additions and 15 deletions

View file

@ -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())
}
}
}