Skip to content

Commit 58d1f83

Browse files
committed
remove redundant info
1 parent f9e049a commit 58d1f83

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libcore/cell.rs

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

0 commit comments

Comments
 (0)