Skip to content

Commit

Permalink
ingo iter directly test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 30, 2023
1 parent 91e5117 commit dc72b7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ $ rustup run nightly cargo bench
```

Then, after the changes you make, run it again. Compare the results. If your changes
degrade performance, think twice before submitting a pull request.
degrade performance, think twice before submitting a pull request.
4 changes: 2 additions & 2 deletions src/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ fn insert_and_into_iterate() {
m.insert("one", 42);
m.insert("two", 16);
let mut sum = 0;
for (_k, v) in m.into_iter() {
sum += v;
for p in &m {
sum += p.1;
}
assert_eq!(58, sum);
}
Expand Down

0 comments on commit dc72b7d

Please sign in to comment.