Skip to content

Commit

Permalink
riff: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sscobici committed Jan 18, 2025
1 parent 92720e8 commit 0affead
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions symphonia-format-riff/src/aiff/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,7 @@ impl ParseChunk for CommonChunk {
let sample_size = reader.read_be_i16()?;
let sample_rate = read_sample_rate(reader)?;

let format_data = Self::read_pcm_fmt(sample_size as u16, n_channels as u16);

let format_data = match format_data {
Ok(data) => data,
Err(e) => return Err(e),
};
let format_data = Self::read_pcm_fmt(sample_size as u16, n_channels as u16)?;

Ok(CommonChunk { n_channels, n_sample_frames, sample_size, sample_rate, format_data })
}
Expand Down Expand Up @@ -232,12 +227,7 @@ impl CommonChunkParser for ChunkParser<CommonChunk> {
b"sowt" | b"SOWT" => CommonChunk::read_sowt_fmt(sample_size as u16, n_channels as u16),
b"twos" | b"TWOS" => CommonChunk::read_twos_fmt(sample_size as u16, n_channels as u16),
_ => return unsupported_error("aifc: Compression type not implemented"),
};

let format_data = match format_data {
Ok(data) => data,
Err(e) => return Err(e),
};
}?;

Ok(CommonChunk { n_channels, n_sample_frames, sample_size, sample_rate, format_data })
}
Expand Down

0 comments on commit 0affead

Please sign in to comment.