提交 f62c121e 编写于 作者: A Alex Crichton

core: Inherit the cell module

上级 d4b5d82a
......@@ -12,7 +12,6 @@
use clone::Clone;
use cmp::Eq;
use fmt;
use kinds::{marker, Copy};
use ops::{Deref, DerefMut, Drop};
use option::{None, Option, Some};
......@@ -60,12 +59,6 @@ fn eq(&self, other: &Cell<T>) -> bool {
}
}
impl<T: Copy + fmt::Show> fmt::Show for Cell<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f.buf, r"Cell \{ value: {} \}", self.get())
}
}
/// A mutable memory location with dynamically checked borrow rules
pub struct RefCell<T> {
value: Unsafe<T>,
......
......@@ -67,11 +67,12 @@
mod unit;
pub mod any;
pub mod bool;
pub mod cell;
pub mod char;
pub mod finally;
pub mod iter;
pub mod option;
pub mod raw;
pub mod char;
pub mod result;
pub mod slice;
pub mod str;
......
......@@ -485,6 +485,7 @@ fn my_fmt_fn(args: &fmt::Arguments) {
use any;
use cast;
use cell::Cell;
use char::Char;
use cmp;
use container::Container;
......@@ -492,6 +493,7 @@ fn my_fmt_fn(args: &fmt::Arguments) {
use io;
use iter;
use iter::{Iterator, range};
use kinds::Copy;
use num::Signed;
use option::{Option, Some, None};
use owned::Box;
......
......@@ -141,6 +141,7 @@
pub use core::any;
pub use core::bool;
pub use core::cast;
pub use core::cell;
pub use core::char;
pub use core::clone;
pub use core::container;
......@@ -220,7 +221,6 @@ fn start(argc: int, argv: **u8) -> int {
/* Common data structures */
pub mod result;
pub mod cell;
/* Tasks and communication */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册