diff --git a/rtcp/src/payload_feedbacks/full_intra_request/mod.rs b/rtcp/src/payload_feedbacks/full_intra_request/mod.rs index 0cea800c9..fa8440889 100644 --- a/rtcp/src/payload_feedbacks/full_intra_request/mod.rs +++ b/rtcp/src/payload_feedbacks/full_intra_request/mod.rs @@ -104,7 +104,7 @@ impl Marshal for FullIntraRequest { buf.put_u32(self.sender_ssrc); buf.put_u32(self.media_ssrc); - for (_, fir) in self.fir.iter().enumerate() { + for fir in self.fir.iter() { buf.put_u32(fir.ssrc); buf.put_u8(fir.sequence_number); buf.put_u8(0); diff --git a/sctp/src/queue/pending_queue.rs b/sctp/src/queue/pending_queue.rs index 8b4ab66da..2a5d0bb2b 100644 --- a/sctp/src/queue/pending_queue.rs +++ b/sctp/src/queue/pending_queue.rs @@ -165,16 +165,16 @@ impl PendingQueue { if self.selected.load(Ordering::SeqCst) { if self.unordered_is_selected.load(Ordering::SeqCst) { let unordered_queue = self.unordered_queue.read(); - return unordered_queue.get(0).cloned(); + return unordered_queue.front().cloned(); } else { let ordered_queue = self.ordered_queue.read(); - return ordered_queue.get(0).cloned(); + return ordered_queue.front().cloned(); } } let c = { let unordered_queue = self.unordered_queue.read(); - unordered_queue.get(0).cloned() + unordered_queue.front().cloned() }; if c.is_some() { @@ -182,7 +182,7 @@ impl PendingQueue { } let ordered_queue = self.ordered_queue.read(); - ordered_queue.get(0).cloned() + ordered_queue.front().cloned() } pub(crate) fn pop( diff --git a/sdp/src/direction/direction_test.rs b/sdp/src/direction/direction_test.rs index 37a884ab3..6e25d4535 100644 --- a/sdp/src/direction/direction_test.rs +++ b/sdp/src/direction/direction_test.rs @@ -17,7 +17,7 @@ fn test_new_direction() { let dir = Direction::new(u.0); assert!(u.1 == dir, "{}: {}", i, u.0); } - for (_, &u) in failingtests.iter().enumerate() { + for &u in failingtests.iter() { let dir = Direction::new(u); assert!(dir == Direction::Unspecified); }