chore: Fix len_zero warning in symphonia Mp3Decoder

This commit is contained in:
Mike Welsh 2022-04-11 15:48:06 -07:00
parent 24f00238a7
commit c0dff98d84
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ pub mod symphonia {
while let Ok(packet) = self.reader.next_packet() { while let Ok(packet) = self.reader.next_packet() {
match self.decoder.decode(&packet) { match self.decoder.decode(&packet) {
Ok(decoded) => { Ok(decoded) => {
if self.sample_buf.len() == 0 { if self.sample_buf.is_empty() {
self.sample_buf = audio::SampleBuffer::new( self.sample_buf = audio::SampleBuffer::new(
decoded.capacity() as core::units::Duration, decoded.capacity() as core::units::Duration,
*decoded.spec(), *decoded.spec(),