Skip to content

Commit c9ab33a

Browse files
committed
Address review comments
1 parent 26e4680 commit c9ab33a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/libcore/cell.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//! containers that can be cloned and shared between multiple parties.
5555
//! Because the contained values may be multiply-aliased, they can
5656
//! only be borrowed as shared references, not mutable references.
57-
//! Without cells then it would be impossible to mutate data inside of
57+
//! Without cells it would be impossible to mutate data inside of
5858
//! shared boxes at all!
5959
//!
6060
//! It's very common then to put a `RefCell` inside shared pointer
@@ -104,7 +104,7 @@
104104
//! // Take a reference to the inside of cache cell
105105
//! let mut cache = self.span_tree_cache.borrow_mut();
106106
//! if cache.is_some() {
107-
//! return cache.take_unwrap().clone();
107+
//! return cache.get_ref().clone();
108108
//! }
109109
//!
110110
//! let span_tree = self.calc_span_tree();
@@ -118,14 +118,14 @@
118118
//! // This is the major hazard of using `RefCell`.
119119
//! self.minimum_spanning_tree()
120120
//! }
121-
//! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec!() }
121+
//! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec![] }
122122
//! }
123123
//! # fn main() { }
124124
//! ```
125125
//!
126126
//! ## Mutating implementations of `clone`
127127
//!
128-
//! This is simply a special - bot common - case of the previous:
128+
//! This is simply a special - but common - case of the previous:
129129
//! hiding mutability for operations that appear to be immutable.
130130
//! The `clone` method is expected to not change the source value, and
131131
//! is declared to take `&self`, not `&mut self`. Therefore any

src/libcore/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
//! Rust Standard Library](../std/index.html). It is the portable glue
1515
//! between the language and its libraries, defining the intrinsic and
1616
//! primitive building blocks of all Rust code. It links to no
17-
//! upstream libraries, no system libraries, no libc.
17+
//! upstream libraries, no system libraries, and no libc.
1818
//!
1919
//! The core library is *minimal*: it isn't even aware of heap allocation,
2020
//! nor does it provide concurrency or I/O. These things require
21-
//! platform integration, and this library is platform-oblivious.
21+
//! platform integration, and this library is platform-agnostic.
2222
//!
2323
//! *It is not recommended to use the core library*. The stable
2424
//! functionality of libcore is reexported from the

src/libstd/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//!
1717
//! ## Intrinsic types and operations
1818
//!
19-
//! The [`ptr`](../core/ptr/index.html), [`mem`](../core/mem/index.html),
19+
//! The [`ptr`](../core/ptr/index.html) and [`mem`](../core/mem/index.html)
2020
//! modules deal with unsafe pointers and memory manipulation.
2121
//! [`kinds`](../core/kinds/index.html) defines the special built-in traits,
2222
//! and [`raw`](../core/raw/index.html) the runtime representation of Rust types.

0 commit comments

Comments
 (0)