Skip to content

Commit 31c1519

Browse files
committed
chore: Fix failing CI jobs.
Fixes #377.
1 parent 6e0f198 commit 31c1519

File tree

26 files changed

+33
-9
lines changed

26 files changed

+33
-9
lines changed

symphonia-codec-aac/src/aac/ics/tns.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ impl Tns {
167167
for f in 0..self.n_filt[w] {
168168
let top = bottom;
169169

170-
bottom =
171-
if top > self.coeffs[w][f].length { top - self.coeffs[w][f].length } else { 0 };
170+
bottom = top.saturating_sub(self.coeffs[w][f].length);
172171

173172
let order = self.coeffs[w][f].order;
174173

symphonia-core/src/audio.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl<S: Sample> AudioBuffer<S> {
340340
/// Note: This is not a cheap operation for audio buffers with > 8 channels. It is advisable
341341
/// that this call is only used when operating on large batches of frames. Generally speaking,
342342
/// it is almost always better to use `chan()` to selectively choose the plane to read instead.
343-
pub fn planes(&self) -> AudioPlanes<S> {
343+
pub fn planes(&self) -> AudioPlanes<'_, S> {
344344
// Fill the audio planes structure with references to the written portion of each audio
345345
// plane.
346346
let mut planes = AudioPlanes::new(self.spec.channels);
@@ -358,7 +358,7 @@ impl<S: Sample> AudioBuffer<S> {
358358
/// that this call is only used when modifying large batches of frames. Generally speaking,
359359
/// it is almost always better to use `render()`, `fill()`, `chan_mut()`, and `chan_pair_mut()`
360360
/// to modify the buffer instead.
361-
pub fn planes_mut(&mut self) -> AudioPlanesMut<S> {
361+
pub fn planes_mut(&mut self) -> AudioPlanesMut<'_, S> {
362362
// Fill the audio planes structure with references to the written portion of each audio
363363
// plane.
364364
let mut planes = AudioPlanesMut::new(self.spec.channels);
@@ -472,13 +472,13 @@ impl AudioBufferRef<'_> {
472472
/// `AudioBufferRef`.
473473
pub trait AsAudioBufferRef {
474474
/// Get an `AudioBufferRef` reference.
475-
fn as_audio_buffer_ref(&self) -> AudioBufferRef;
475+
fn as_audio_buffer_ref(&self) -> AudioBufferRef<'_>;
476476
}
477477

478478
macro_rules! impl_as_audio_buffer_ref {
479479
($fmt:ty, $ref:path) => {
480480
impl AsAudioBufferRef for AudioBuffer<$fmt> {
481-
fn as_audio_buffer_ref(&self) -> AudioBufferRef {
481+
fn as_audio_buffer_ref(&self) -> AudioBufferRef<'_> {
482482
$ref(Cow::Borrowed(self))
483483
}
484484
}

symphonia-core/src/codecs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ pub trait Decoder: Send + Sync {
490490
/// decoded audio buffer to change. All other errors are unrecoverable.
491491
///
492492
/// Implementors of decoders *must* `clear` the internal buffer if an error occurs.
493-
fn decode(&mut self, packet: &Packet) -> Result<AudioBufferRef>;
493+
fn decode(&mut self, packet: &Packet) -> Result<AudioBufferRef<'_>>;
494494

495495
/// Optionally, obtain post-decode information such as the verification status.
496496
fn finalize(&mut self) -> FinalizeResult;
@@ -500,7 +500,7 @@ pub trait Decoder: Send + Sync {
500500
/// After a successful call to `decode`, this will contain the audio content of the last decoded
501501
/// `Packet`. If the last call to `decode` resulted in an error, then implementors *must* ensure
502502
/// the returned audio buffer has zero length.
503-
fn last_decoded(&self) -> AudioBufferRef;
503+
fn last_decoded(&self) -> AudioBufferRef<'_>;
504504
}
505505

506506
/// A `CodecDescriptor` stores a description of a single logical codec. Common information such as

symphonia-core/src/formats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl Packet {
319319
}
320320

321321
/// Get a `BufStream` to read the packet data buffer sequentially.
322-
pub fn as_buf_reader(&self) -> BufReader {
322+
pub fn as_buf_reader(&self) -> BufReader<'_> {
323323
BufReader::new(&self.data)
324324
}
325325
}

symphonia-format-isomp4/src/atoms/alac.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use symphonia_core::io::ReadBytes;
1111

1212
use crate::atoms::{Atom, AtomHeader};
1313

14+
#[allow(dead_code)]
1415
#[derive(Debug)]
1516
pub struct AlacAtom {
1617
/// Atom header.

symphonia-format-isomp4/src/atoms/co64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use symphonia_core::io::ReadBytes;
1111
use crate::atoms::{Atom, AtomHeader};
1212

1313
/// Chunk offset atom (64-bit version).
14+
#[allow(dead_code)]
1415
#[derive(Debug)]
1516
pub struct Co64Atom {
1617
/// Atom header.

symphonia-format-isomp4/src/atoms/ctts.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use symphonia_core::io::ReadBytes;
1111
use crate::atoms::{Atom, AtomHeader};
1212

1313
/// Composition time atom.
14+
#[allow(dead_code)]
1415
#[derive(Debug)]
1516
pub struct CttsAtom {
1617
/// Atom header.

symphonia-format-isomp4/src/atoms/esds.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ fn read_descriptor_header<B: ReadBytes>(reader: &mut B) -> Result<(u8, u32)> {
3838
Ok((tag, size))
3939
}
4040

41+
#[allow(dead_code)]
4142
#[derive(Debug)]
4243
pub struct EsdsAtom {
4344
/// Atom header.

symphonia-format-isomp4/src/atoms/flac.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use symphonia_utils_xiph::flac::metadata::{MetadataBlockHeader, MetadataBlockTyp
1313

1414
use crate::atoms::{Atom, AtomHeader};
1515

16+
#[allow(dead_code)]
1617
#[derive(Debug)]
1718
pub struct FlacAtom {
1819
/// Atom header.

symphonia-format-isomp4/src/atoms/ilst.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ fn add_freeform_tag<B: ReadBytes>(
473473
}
474474

475475
/// Metadata tag data atom.
476+
#[allow(dead_code)]
476477
pub struct MetaTagDataAtom {
477478
/// Atom header.
478479
header: AtomHeader,
@@ -515,6 +516,7 @@ impl Atom for MetaTagDataAtom {
515516
}
516517

517518
/// Metadata tag name and mean atom.
519+
#[allow(dead_code)]
518520
pub struct MetaTagNamespaceAtom {
519521
/// Atom header.
520522
header: AtomHeader,
@@ -541,6 +543,7 @@ impl Atom for MetaTagNamespaceAtom {
541543
}
542544

543545
/// A generic metadata tag atom.
546+
#[allow(dead_code)]
544547
pub struct MetaTagAtom {
545548
/// Atom header.
546549
header: AtomHeader,
@@ -606,6 +609,7 @@ impl Atom for MetaTagAtom {
606609
}
607610

608611
/// User data atom.
612+
#[allow(dead_code)]
609613
pub struct IlstAtom {
610614
/// Atom header.
611615
header: AtomHeader,

0 commit comments

Comments
 (0)