iterator: UnfoldrIterator::new should have function argument last
To match Rust conventions and enable use of `do` etc, make sure the closure is the last argument to the `new` method.
This commit is contained in:
parent
ee7307e6cb
commit
b9cf6a33d2
2 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
let mut it = UnfoldrIterator::new(count, 0);
|
||||
let mut it = UnfoldrIterator::new(0, count);
|
||||
let mut i = 0;
|
||||
for it.advance |counted| {
|
||||
assert_eq!(counted, i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue