From 2c539d4eecec3c63f878a3798e0ea4df79b46f19 Mon Sep 17 00:00:00 2001 From: Palmer Cox
Date: Wed, 11 Dec 2013 20:51:22 -0500
Subject: 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 | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
(limited to 'src/libstd')
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 17e961723cf..b03cef09350 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -2528,13 +2528,13 @@ impl<'a, T> Iterator<&'a mut [T]> for MutSplitIterator<'a, T> {
#[inline]
fn size_hint(&self) -> (uint, Option