File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/libstd/collections/hash Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -66,17 +66,17 @@ use super::state::HashState;
66
66
/// books.insert("The Great Gatsby");
67
67
///
68
68
/// // Check for a specific one.
69
- /// if !books.contains(&( "The Winds of Winter") ) {
69
+ /// if !books.contains("The Winds of Winter") {
70
70
/// println!("We have {} books, but The Winds of Winter ain't one.",
71
71
/// books.len());
72
72
/// }
73
73
///
74
74
/// // Remove a book.
75
- /// books.remove(& "The Odyssey");
75
+ /// books.remove("The Odyssey");
76
76
///
77
77
/// // Iterate over everything.
78
- /// for book in books.iter() {
79
- /// println!("{}", * book);
78
+ /// for book in & books {
79
+ /// println!("{}", book);
80
80
/// }
81
81
/// ```
82
82
///
@@ -100,7 +100,7 @@ use super::state::HashState;
100
100
/// vikings.insert(Viking { name: "Harald", power: 8 });
101
101
///
102
102
/// // Use derived implementation to print the vikings.
103
- /// for x in vikings.iter() {
103
+ /// for x in & vikings {
104
104
/// println!("{:?}", x);
105
105
/// }
106
106
/// ```
You can’t perform that action at this time.
0 commit comments