Expand description
Utility for taking the value from a Cell<Option<T>>
without cloning.
After taking, the cell will have a None
.
§Example
use take_cell_option::take;
use core::cell::Cell;
let cell = Cell::new(Some(Box::new(10)));
let v = take(&cell);
assert_eq!(*v.unwrap(), 10);
assert!(cell.into_inner().is_none());