Remove some as_slice calls

This commit is contained in:
Mathijs van de Nes 2015-03-16 10:15:46 +01:00
parent d778c0bb30
commit 132530cb41
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ impl CentralDirectoryEnd
try!(writer.write_u32::<LittleEndian>(self.central_directory_size));
try!(writer.write_u32::<LittleEndian>(self.central_directory_offset));
try!(writer.write_u16::<LittleEndian>(self.zip_file_comment.len() as u16));
try!(writer.write_all(self.zip_file_comment.as_slice()));
try!(writer.write_all(&self.zip_file_comment));
Ok(())
}
}

View file

@ -299,7 +299,7 @@ fn write_local_file_header<T: Write>(writer: &mut T, file: &ZipFileData) -> ZipR
let extra_field = try!(build_extra_field(file));
try!(writer.write_u16::<LittleEndian>(extra_field.len() as u16));
try!(writer.write_all(file.file_name.as_bytes()));
try!(writer.write_all(extra_field.as_slice()));
try!(writer.write_all(&extra_field));
Ok(())
}
@ -336,7 +336,7 @@ fn write_central_directory_header<T: Write>(writer: &mut T, file: &ZipFileData)
try!(writer.write_u32::<LittleEndian>(0));
try!(writer.write_u32::<LittleEndian>(file.header_start as u32));
try!(writer.write_all(file.file_name.as_bytes()));
try!(writer.write_all(extra_field.as_slice()));
try!(writer.write_all(&extra_field));
Ok(())
}