Removed many pointless calls to *iter() and iter_mut()

This commit is contained in:
Joshua Landau
2015-06-10 17:22:20 +01:00
parent d8a9570154
commit ca7418b846
117 changed files with 292 additions and 294 deletions

View File

@@ -78,7 +78,7 @@ pub fn repeat(byte: u8) -> Repeat { Repeat { byte: byte } }
#[stable(feature = "rust1", since = "1.0.0")]
impl Read for Repeat {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
for slot in buf.iter_mut() {
for slot in &mut *buf {
*slot = self.byte;
}
Ok(buf.len())