Skip to content

Commit 7d31197

Browse files
committed
Fixed references to set & take ; minor wording & syntax fixes
1 parent 2fc6224 commit 7d31197

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libstd/collections/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
//! * You want a bit vector.
7979
//!
8080
//! ### Use a `BitSet` when:
81-
//! * You want a `VecSet`.
81+
//! * You want a `BitVec`, but want `Set` properties
8282
//!
8383
//! ### Use a `BinaryHeap` when:
8484
//! * You want to store a bunch of elements, but only ever want to process the "biggest"
@@ -280,16 +280,16 @@
280280
//! a variant of the `Entry` enum.
281281
//!
282282
//! If a `Vacant(entry)` is yielded, then the key *was not* found. In this case the
283-
//! only valid operation is to `set` the value of the entry. When this is done,
283+
//! only valid operation is to `insert` a value into the entry. When this is done,
284284
//! the vacant entry is consumed and converted into a mutable reference to the
285285
//! the value that was inserted. This allows for further manipulation of the value
286286
//! beyond the lifetime of the search itself. This is useful if complex logic needs to
287287
//! be performed on the value regardless of whether the value was just inserted.
288288
//!
289289
//! If an `Occupied(entry)` is yielded, then the key *was* found. In this case, the user
290-
//! has several options: they can `get`, `set`, or `take` the value of the occupied
290+
//! has several options: they can `get`, `insert`, or `remove` the value of the occupied
291291
//! entry. Additionally, they can convert the occupied entry into a mutable reference
292-
//! to its value, providing symmetry to the vacant `set` case.
292+
//! to its value, providing symmetry to the vacant `insert` case.
293293
//!
294294
//! ### Examples
295295
//!
@@ -329,7 +329,7 @@
329329
//! use std::collections::btree_map::{BTreeMap, Entry};
330330
//!
331331
//! // A client of the bar. They have an id and a blood alcohol level.
332-
//! struct Person { id: u32, blood_alcohol: f32 };
332+
//! struct Person { id: u32, blood_alcohol: f32 }
333333
//!
334334
//! // All the orders made to the bar, by client id.
335335
//! let orders = vec![1,2,1,2,3,4,1,2,2,3,4,1,1,1];

0 commit comments

Comments
 (0)