mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 09:20:45 +00:00
clippy: Use .write_all() when writing a slice
This commit is contained in:
10
src/cue.rs
10
src/cue.rs
@@ -70,7 +70,7 @@ impl RawLabel {
|
||||
fn write_to(&self) -> Vec<u8> {
|
||||
let mut writer = Cursor::new(vec![0u8; 0]);
|
||||
writer.write_u32::<LittleEndian>(self.cue_point_id).unwrap();
|
||||
writer.write(&self.text).unwrap();
|
||||
writer.write_all(&self.text).unwrap();
|
||||
writer.into_inner()
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ impl RawNote {
|
||||
fn write_to(&self) -> Vec<u8> {
|
||||
let mut writer = Cursor::new(vec![0u8; 0]);
|
||||
writer.write_u32::<LittleEndian>(self.cue_point_id).unwrap();
|
||||
writer.write(&self.text).unwrap();
|
||||
writer.write_all(&self.text).unwrap();
|
||||
writer.into_inner()
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ impl RawLtxt {
|
||||
writer.write_u16::<LittleEndian>(self.dialect).unwrap();
|
||||
writer.write_u16::<LittleEndian>(self.code_page).unwrap();
|
||||
if let Some(ext_text) = &self.text {
|
||||
writer.write(ext_text).unwrap();
|
||||
writer.write_all(ext_text).unwrap();
|
||||
}
|
||||
writer.into_inner()
|
||||
}
|
||||
@@ -192,7 +192,7 @@ impl RawAdtlMember {
|
||||
};
|
||||
w.write_fourcc(fcc).unwrap();
|
||||
w.write_u32::<LittleEndian>(buf.len() as u32).unwrap();
|
||||
w.write(&buf).unwrap();
|
||||
w.write_all(&buf).unwrap();
|
||||
if buf.len() % 2 == 1 {
|
||||
w.write_u8(0).unwrap();
|
||||
}
|
||||
@@ -204,7 +204,7 @@ impl RawAdtlMember {
|
||||
writer
|
||||
.write_u32::<LittleEndian>(chunk_content.len() as u32)
|
||||
.unwrap();
|
||||
writer.write(&chunk_content).unwrap();
|
||||
writer.write_all(&chunk_content).unwrap();
|
||||
writer.into_inner()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user