Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()

closes #7197
This commit is contained in:
João Oliveira 2015-08-15 02:27:04 +01:00
parent 13e7de482c
commit 0038580abf
55 changed files with 141 additions and 154 deletions

View file

@ -141,7 +141,7 @@ impl <'a, T: Iterator<Item=&'a u8> + Clone> Matches for T {
// Side effects
// moves the iterator when match is found
fn matches(&mut self, matches: &[u8]) -> bool {
for (byte_a, byte_b) in self.clone().take(matches.len()).zip(matches.iter()) {
for (byte_a, byte_b) in self.clone().take(matches.len()).zip(matches) {
if byte_a != byte_b {
return false;
}