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

@@ -232,7 +232,7 @@ pub fn escape_default<F>(c: u8, mut f: F) where
_ => {
f(b'\\');
f(b'x');
for &offset in [4u, 0u].iter() {
for &offset in &[4u, 0u] {
match ((c as i32) >> offset) & 0xf {
i @ 0 ... 9 => f(b'0' + (i as u8)),
i => f(b'a' + (i as u8 - 10)),