Skip to content

Commit

Permalink
Merge pull request #1211 from Rosto75/master
Browse files Browse the repository at this point in the history
A couple of fixes for the `HashMap` chapter.
  • Loading branch information
marioidival authored Jun 27, 2019
2 parents 62b3ff2 + 4291774 commit e5b0adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/std/hash/alt_key_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fn try_logon<'a>(accounts: &Accounts<'a>,
println!("Attempting logon...");
let logon = Account {
username: username,
password: password,
username,
password,
};
match accounts.get(&logon) {
Expand Down
4 changes: 2 additions & 2 deletions src/std/hash/hashset.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Try all of these in the following example:
use std::collections::HashSet;
fn main() {
let mut a: HashSet<i32> = vec!(1i32, 2, 3).into_iter().collect();
let mut b: HashSet<i32> = vec!(2i32, 3, 4).into_iter().collect();
let mut a: HashSet<i32> = vec![1i32, 2, 3].into_iter().collect();
let mut b: HashSet<i32> = vec![2i32, 3, 4].into_iter().collect();
assert!(a.insert(4));
assert!(a.contains(&4));
Expand Down

0 comments on commit e5b0adb

Please sign in to comment.