about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlexis <a.beingessner@gmail.com>2015-02-06 13:57:13 -0500
committerManish Goregaokar <manishsmail@gmail.com>2015-02-07 00:31:20 +0530
commit3a9b4e5f8dfc7bb8f27cc27c3f2ecf9750b87a26 (patch)
treebbead11db730e108f69d310c6498b83fbe3d96dc /src/libstd
parente5f25244f14e9c67198226e0b6ac45f4ffdf349b (diff)
downloadrust-3a9b4e5f8dfc7bb8f27cc27c3f2ecf9750b87a26.tar.gz
rust-3a9b4e5f8dfc7bb8f27cc27c3f2ecf9750b87a26.zip
fix outdated docs
Conflicts:
	src/libstd/collections/mod.rs
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs
index a167dd65e67..d12c8b93cca 100644
--- a/src/libstd/collections/mod.rs
+++ b/src/libstd/collections/mod.rs
@@ -209,7 +209,7 @@
 //! all the contents of the collection.
 //!
 //! ```
-//! let vec = vec![1u, 2, 3, 4];
+//! let vec = vec![1, 2, 3, 4];
 //! for x in vec.iter() {
 //!    println!("vec contained {}", x);
 //! }
@@ -219,7 +219,7 @@
 //! This is great for mutating all the contents of the collection.
 //!
 //! ```
-//! let mut vec = vec![1u, 2, 3, 4];
+//! let mut vec = vec![1, 2, 3, 4];
 //! for x in vec.iter_mut() {
 //!    *x += 1;
 //! }
@@ -234,15 +234,15 @@
 //! previous section to do this as efficiently as possible.
 //!
 //! ```
-//! let mut vec1 = vec![1u, 2, 3, 4];
-//! let vec2 = vec![10u, 20, 30, 40];
+//! let mut vec1 = vec![1, 2, 3, 4];
+//! let vec2 = vec![10, 20, 30, 40];
 //! vec1.extend(vec2.into_iter());
 //! ```
 //!
 //! ```
 //! use std::collections::RingBuf;
 //!
-//! let vec = vec![1u, 2, 3, 4];
+//! let vec = vec![1, 2, 3, 4];
 //! let buf: RingBuf<uint> = vec.into_iter().collect();
 //! ```
 //!
@@ -253,7 +253,7 @@
 //! iterators as the way to iterate over them in reverse order.
 //!
 //! ```
-//! let vec = vec![1u, 2, 3, 4];
+//! let vec = vec![1, 2, 3, 4];
 //! for x in vec.iter().rev() {
 //!    println!("vec contained {}", x);
 //! }
@@ -326,7 +326,7 @@
 //! #### Tracking the inebriation of customers at a bar
 //!
 //! ```
-//! use std::collections::btree_map::{BTreeMap, Occupied, Vacant};
+//! use std::collections::btree_map::{BTreeMap, Entry};
 //!
 //! // A client of the bar. They have an id and a blood alcohol level.
 //! struct Person { id: u32, blood_alcohol: f32 };
@@ -341,8 +341,8 @@
 //!     // If this is the first time we've seen this customer, initialize them
 //!     // with no blood alcohol. Otherwise, just retrieve them.
 //!     let person = match blood_alcohol.entry(id) {
-//!         Vacant(entry) => entry.insert(Person{id: id, blood_alcohol: 0.0}),
-//!         Occupied(entry) => entry.into_mut(),
+//!         Entry::Vacant(entry) => entry.insert(Person{id: id, blood_alcohol: 0.0}),
+//!         Entry::Occupied(entry) => entry.into_mut(),
 //!     };
 //!
 //!     // Reduce their blood alcohol level. It takes time to order and drink a beer!