remove redundant info

This commit is contained in:
Christian Poveda
2018-02-23 13:00:26 -05:00
parent f9e049afc5
commit 58d1f83952

View File

@@ -17,19 +17,19 @@
//! - Having one mutable reference (`&mut T`) to the object (also know as Mutability). //! - Having one mutable reference (`&mut T`) to the object (also know as Mutability).
//! //!
//! This is enforced by the Rust compiler. However, there are situations where this rule is not //! This is enforced by the Rust compiler. However, there are situations where this rule is not
//! flexible enough. Sometimes is required to have multiple references to an object and yet //! flexible enough. Sometimes is required to have multiple references to an object and yet
//! mutate it. //! mutate it.
//! //!
//! Shareable mutable containers exist to permit mutability in presence of aliasing in a //! Shareable mutable containers exist to permit mutability in presence of aliasing in a
//! controlled manner. Both `Cell<T>` and `RefCell<T>` allows to do this in a single threaded //! controlled manner. Both `Cell<T>` and `RefCell<T>` allows to do this in a single threaded
//! way, you can mutate them using an inmutable reference. However, neither `Cell<T>` nor //! way. However, neither `Cell<T>` nor `RefCell<T>` are thread safe (they do not implement
//! `RefCell<T>` are thread safe (they do not implement `Sync`), if you need to do Aliasing and //! `Sync`), if you need to do Aliasing and Mutation between multiple threads is possible to use
//! Mutation between multiple threads is possible to use `Mutex`, `RwLock` or `AtomicXXX`. //! `Mutex`, `RwLock` or `AtomicXXX`.
//! //!
//! Values of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e. //! Values of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e.
//! the common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`) //! the common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`)
//! references. We say that `Cell<T>` and `RefCell<T>` provide 'interior mutability', in contrast //! references. We say that `Cell<T>` and `RefCell<T>` provide 'interior mutability', in contrast
//! with typical Rust types that exhibit 'inherited mutability'. //! with typical Rust types that exhibit 'inherited mutability'.
//! //!
//! Cell types come in two flavors: `Cell<T>` and `RefCell<T>`. `Cell<T>` implements interior //! Cell types come in two flavors: `Cell<T>` and `RefCell<T>`. `Cell<T>` implements interior
//! mutability by moving values in and out of the `Cell<T>`. To use references instead of values, //! mutability by moving values in and out of the `Cell<T>`. To use references instead of values,