Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Oct 7, 2023
1 parent f1438f2 commit 58b7e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/rtp/mtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ impl Eq for MediaTime {}
impl PartialOrd for MediaTime {
#[inline(always)]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let (t0, t1) = MediaTime::same_base(*self, *other);
Some(t0.cmp(&t1))
Some(self.cmp(other))
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,5 @@ pub struct PacketReceipt {
/// Find the PayloadParams for the given Pt, either when the Pt is the main Pt for the Codec or
/// when it's the RTX Pt.
fn main_payload_params(c: &CodecConfig, pt: Pt) -> Option<&PayloadParams> {
c.iter()
.find_map(|p| (p.pt == pt || p.resend == Some(pt)).then_some(p))
c.iter().find(|p| (p.pt == pt || p.resend == Some(pt)))
}

0 comments on commit 58b7e24

Please sign in to comment.