diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index 56a0dca56679..4803e2e004e7 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -1316,10 +1316,9 @@ pub struct Take { impl> Iterator for Take { #[inline] fn next(&mut self) -> Option { - let next = self.iter.next(); if self.n != 0 { self.n -= 1; - next + self.iter.next() } else { None }