Skip to content

Commit af8ae11

Browse files
committed
riff: fix clippy warnings
1 parent 5a9bc17 commit af8ae11

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Diff for: symphonia-format-riff/src/aiff/chunks.rs

+2-12
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,7 @@ impl ParseChunk for CommonChunk {
152152
let sample_rate = Extended::from_be_bytes(sample_rate);
153153
let sample_rate = sample_rate.to_f64() as u32;
154154

155-
let format_data = Self::read_pcm_fmt(sample_size as u16, n_channels as u16);
156-
157-
let format_data = match format_data {
158-
Ok(data) => data,
159-
Err(e) => return Err(e),
160-
};
155+
let format_data = Self::read_pcm_fmt(sample_size as u16, n_channels as u16)?;
161156

162157
Ok(CommonChunk { n_channels, n_sample_frames, sample_size, sample_rate, format_data })
163158
}
@@ -244,12 +239,7 @@ impl CommonChunkParser for ChunkParser<CommonChunk> {
244239
b"sowt" | b"SOWT" => CommonChunk::read_sowt_fmt(sample_size as u16, n_channels as u16),
245240
b"twos" | b"TWOS" => CommonChunk::read_twos_fmt(sample_size as u16, n_channels as u16),
246241
_ => return unsupported_error("aifc: Compression type not implemented"),
247-
};
248-
249-
let format_data = match format_data {
250-
Ok(data) => data,
251-
Err(e) => return Err(e),
252-
};
242+
}?;
253243

254244
Ok(CommonChunk { n_channels, n_sample_frames, sample_size, sample_rate, format_data })
255245
}

0 commit comments

Comments
 (0)