clippy: Avoid () as return type

This commit is contained in:
Ian Hobson
2023-05-12 16:52:06 +02:00
parent cf5ec121da
commit f6f4869b5b
2 changed files with 3 additions and 5 deletions

View File

@@ -320,7 +320,7 @@ impl WaveFmt {
}
/// Write frames into a byte vector
pub fn pack_frames(&self, from_frames: &[i32], into_bytes: &mut [u8]) -> () {
pub fn pack_frames(&self, from_frames: &[i32], into_bytes: &mut [u8]) {
let mut write_cursor = Cursor::new(into_bytes);
assert!(
@@ -338,11 +338,10 @@ impl WaveFmt {
b, self.channel_count, self.block_alignment)
}
}
()
}
/// Read bytes into frames
pub fn unpack_frames(&self, from_bytes: &[u8], into_frames: &mut [i32]) -> () {
pub fn unpack_frames(&self, from_bytes: &[u8], into_frames: &mut [i32]) {
let mut rdr = Cursor::new(from_bytes);
for frame in into_frames {
*frame = match (self.valid_bits_per_sample(), self.bits_per_sample) {