1
Fork 0

De-export std::{bitv, cell, timer}. Part of #3583.

This commit is contained in:
Graydon Hoare 2012-09-28 14:55:31 -07:00
parent 94f7bf98f9
commit 70ae3e7bf2
4 changed files with 12 additions and 19 deletions

View file

@ -3,16 +3,16 @@
///
/// Similar to a mutable option type, but friendlier.
struct Cell<T> {
pub struct Cell<T> {
mut value: Option<T>
}
/// Creates a new full cell with the given value.
fn Cell<T>(+value: T) -> Cell<T> {
pub fn Cell<T>(+value: T) -> Cell<T> {
Cell { value: Some(move value) }
}
fn empty_cell<T>() -> Cell<T> {
pub fn empty_cell<T>() -> Cell<T> {
Cell { value: None }
}