Skip to content

Commit

Permalink
fix clippy/fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Jan 1, 2024
1 parent 0dbdbf9 commit c2f4c33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rtcp/src/payload_feedbacks/full_intra_request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions sctp/src/queue/pending_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,24 @@ 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() {
return c;
}

let ordered_queue = self.ordered_queue.read();
ordered_queue.get(0).cloned()
ordered_queue.front().cloned()
}

pub(crate) fn pop(
Expand Down
2 changes: 1 addition & 1 deletion sdp/src/direction/direction_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c2f4c33

Please sign in to comment.