about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPascal Hertleif <killercup@gmail.com>2015-05-03 18:06:08 +0200
committerPascal Hertleif <killercup@gmail.com>2015-05-03 18:06:08 +0200
commit1283044a1a48fae610e7b602e0eb876748c7fb73 (patch)
tree3aae15f08cce64527e6f8cacfcd70aa6fb050555
parent6814c2f1aa0b214a9d2767283c57446d0b66fa6f (diff)
downloadrust-1283044a1a48fae610e7b602e0eb876748c7fb73.tar.gz
rust-1283044a1a48fae610e7b602e0eb876748c7fb73.zip
Clean up HashSet Examples
-rw-r--r--src/libstd/collections/hash/set.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index 9ff3ed88cc4..896573cbf8b 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -66,17 +66,17 @@ use super::state::HashState;
 /// books.insert("The Great Gatsby");
 ///
 /// // Check for a specific one.
-/// if !books.contains(&("The Winds of Winter")) {
+/// if !books.contains("The Winds of Winter") {
 ///     println!("We have {} books, but The Winds of Winter ain't one.",
 ///              books.len());
 /// }
 ///
 /// // Remove a book.
-/// books.remove(&"The Odyssey");
+/// books.remove("The Odyssey");
 ///
 /// // Iterate over everything.
-/// for book in books.iter() {
-///     println!("{}", *book);
+/// for book in &books {
+///     println!("{}", book);
 /// }
 /// ```
 ///
@@ -100,7 +100,7 @@ use super::state::HashState;
 /// vikings.insert(Viking { name: "Harald", power: 8 });
 ///
 /// // Use derived implementation to print the vikings.
-/// for x in vikings.iter() {
+/// for x in &vikings {
 ///     println!("{:?}", x);
 /// }
 /// ```