for x in xs.iter() -> for x in &xs

This commit is contained in:
Jorge Aparicio
2015-01-31 12:20:46 -05:00
parent 9f90d666e0
commit d5d7e6565a
269 changed files with 1063 additions and 1064 deletions

View File

@@ -888,7 +888,7 @@ impl<T: Debug> Debug for [T] {
try!(write!(f, "["));
}
let mut is_first = true;
for x in self.iter() {
for x in self {
if is_first {
is_first = false;
} else {

View File

@@ -205,7 +205,7 @@ impl<S: Writer + Hasher, T: Hash<S>> Hash<S> for [T] {
#[inline]
fn hash(&self, state: &mut S) {
self.len().hash(state);
for elt in self.iter() {
for elt in self {
elt.hash(state);
}
}