Skip to content

Commit e5b0adb

Browse files
authored
Merge pull request #1211 from Rosto75/master
A couple of fixes for the `HashMap` chapter.
2 parents 62b3ff2 + 4291774 commit e5b0adb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/std/hash/alt_key_types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ fn try_logon<'a>(accounts: &Accounts<'a>,
5050
println!("Attempting logon...");
5151
5252
let logon = Account {
53-
username: username,
54-
password: password,
53+
username,
54+
password,
5555
};
5656
5757
match accounts.get(&logon) {

src/std/hash/hashset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Try all of these in the following example:
3636
use std::collections::HashSet;
3737
3838
fn main() {
39-
let mut a: HashSet<i32> = vec!(1i32, 2, 3).into_iter().collect();
40-
let mut b: HashSet<i32> = vec!(2i32, 3, 4).into_iter().collect();
39+
let mut a: HashSet<i32> = vec![1i32, 2, 3].into_iter().collect();
40+
let mut b: HashSet<i32> = vec![2i32, 3, 4].into_iter().collect();
4141
4242
assert!(a.insert(4));
4343
assert!(a.contains(&4));

0 commit comments

Comments
 (0)