mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Merge pull request #2409 from montrivo/while_let_on_iterator
#1121: already fixed, adding a test
This commit is contained in:
commit
4e467661c0
1 changed files with 8 additions and 0 deletions
|
@ -193,4 +193,12 @@ fn refutable() {
|
|||
break None;
|
||||
}
|
||||
};
|
||||
|
||||
use std::collections::HashSet;
|
||||
let mut values = HashSet::new();
|
||||
values.insert(1);
|
||||
|
||||
while let Some(&value) = values.iter().next() {
|
||||
values.remove(&value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue