Remove some as_slice calls
This commit is contained in:
parent
d778c0bb30
commit
132530cb41
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ impl CentralDirectoryEnd
|
||||||
try!(writer.write_u32::<LittleEndian>(self.central_directory_size));
|
try!(writer.write_u32::<LittleEndian>(self.central_directory_size));
|
||||||
try!(writer.write_u32::<LittleEndian>(self.central_directory_offset));
|
try!(writer.write_u32::<LittleEndian>(self.central_directory_offset));
|
||||||
try!(writer.write_u16::<LittleEndian>(self.zip_file_comment.len() as u16));
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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));
|
let extra_field = try!(build_extra_field(file));
|
||||||
try!(writer.write_u16::<LittleEndian>(extra_field.len() as u16));
|
try!(writer.write_u16::<LittleEndian>(extra_field.len() as u16));
|
||||||
try!(writer.write_all(file.file_name.as_bytes()));
|
try!(writer.write_all(file.file_name.as_bytes()));
|
||||||
try!(writer.write_all(extra_field.as_slice()));
|
try!(writer.write_all(&extra_field));
|
||||||
|
|
||||||
Ok(())
|
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>(0));
|
||||||
try!(writer.write_u32::<LittleEndian>(file.header_start as u32));
|
try!(writer.write_u32::<LittleEndian>(file.header_start as u32));
|
||||||
try!(writer.write_all(file.file_name.as_bytes()));
|
try!(writer.write_all(file.file_name.as_bytes()));
|
||||||
try!(writer.write_all(extra_field.as_slice()));
|
try!(writer.write_all(&extra_field));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue