Its documentation does not state what happens if I call next() after next() returns None. Should I call fuse() on it? I am writing some code that might call next() an extra time an want to be sure I cover all bases.
Yes, it implements FusedIterator:
https://doc.rust-lang.org/nightly/std/str/struct.Chars.html#impl-FusedIterator-for-Chars<'_>
Thanks, that is good to know.
According to the docs for FusedIterator in std::iter - Rust calling fuse() on already FusedIterator is a no-op, so you should just use fuse() when you need to ensure that behavior.
2 Likes
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.