Closed crespyl closed 9 years ago
Any idea why this is causing tests to fail?
src/iota/buffer.rs:1000:23: 1000:29 error: type `core::iter::Rev<iterators::Chars<'_>>` does not implement any method in scope named `next`
src/iota/buffer.rs:1000 assert!(chars.next().unwrap() == 'T');
^~~~~~
src/iota/buffer.rs:1001:23: 1001:29 error: type `core::iter::Rev<iterators::Chars<'_>>` does not implement any method in scope named `next`
src/iota/buffer.rs:1001 assert!(chars.next().unwrap() == '͈');
^~~~~~
src/iota/buffer.rs:1002:23: 1002:29 error: type `core::iter::Rev<iterators::Chars<'_>>` does not implement any method in scope named `next`
src/iota/buffer.rs:1002 assert!(chars.next().unwrap() == 't');
Herp derp. I also changed rev
to reverse
so it wouldn't conflict with the stdlib version. reverse
should be "in-place" and change the direction without changing the type of the iterator, rev
is from the stdlib IteratorExt trait and wraps the iterator with a different type struct.
This should help make sure that calls to iter.enumerate work as expected