]> git.lizzy.rs Git - rust.git/commit
Update next() and size_hint() for MutSpliterIterator
authorPalmer Cox <p@lmercox.com>
Thu, 12 Dec 2013 01:51:22 +0000 (20:51 -0500)
committer“Palmer <pcox@intelligent.net>
Sat, 21 Dec 2013 01:40:16 +0000 (20:40 -0500)
commit2c539d4eecec3c63f878a3798e0ea4df79b46f19
tree2142e50e6cc40f15c51305ec2bd77ca01023e1ec
parentefd619467df28b48b97250b2857b18a032b5dab6
Update next() and size_hint() for MutSpliterIterator

Update the next() method to just return self.v in the case that we've reached
the last element that the iterator will yield. This produces equivalent
behavior as before, but without the cost of updating the field.

Update the size_hint() method to return a better hint now that #9629 is fixed.
src/libstd/vec.rs