/// Takes the value out of the `MapCell` leaving it empty. If
/// the value has already been taken elsewhere (and not `replace`ed), the
/// returned `Option` will be `None`.
///
/// # Examples
///
/// ```
/// extern crate tock_cells;
/// use tock_cells::map_cell::MapCell;
///
/// let cell = MapCell::new(1234);
/// let x = &cell;
/// let y = &cell;
///
/// assert_eq!(x.take(), Some(1234));
/// assert_eq!(y.take(), None);
/// ```
Takes the value out of the `MapCell` leaving it empty.
Takes the value out of the ` MapCell ` leaving it empty .
pub fn take(&self) -> Option<T> {
        if self.is_none() {
            return None;
        } else {
            self.occupied.set(false);
            unsafe { Some(ptr::replace(self.val.get(), mem::uninitialized()).some) }
        }
    }
pub fn take ( & self ) -> Option < T > { if self . is_none ( ) { return None ; } else { self . occupied . set ( false ) ; unsafe { Some ( ptr :: replace ( self . val . get ( ) , mem :: uninitialized ( ) ) . some ) } } }
Takes the value out of the `MapCell` leaving it empty.
Takes the value out of the ` MapCell ` leaving it empty .
&self
examples
```
extern crate tock_cells;
use tock_cells::map_cell::MapCell.

let cell = MapCell::new(1234);
let x = &cell
let y = &cell.


` ` ` extern crate tock_cells ; use tock_cells :: map_cell :: MapCell . let cell = MapCell :: new ( 1234 ) ; let x = &cell let y = &cell .