Skip to content

Commit

Permalink
Fixed code by Clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramCrafter committed Mar 28, 2024
1 parent d690c46 commit e8d498a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions interceptor/src/twcc/twcc_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fn test_feedback() -> Result<()> {
pkt.packet_chunks
);

let expected_deltas = vec![
let expected_deltas = [
RecvDelta {
type_tcc_packet: SymbolTypeTcc::PacketReceivedSmallDelta,
delta: 0,
Expand Down Expand Up @@ -338,7 +338,7 @@ fn test_feedback() -> Result<()> {
pkt.packet_chunks
);

let expected_deltas = vec![
let expected_deltas = [
RecvDelta {
type_tcc_packet: SymbolTypeTcc::PacketReceivedSmallDelta,
delta: 0,
Expand Down
2 changes: 1 addition & 1 deletion webrtc/src/rtp_transceiver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl RTCRtpTransceiver {

/// mid gets the Transceiver's mid value. When not already set, this value will be set in CreateOffer or create_answer.
pub fn mid(&self) -> Option<SmolStr> {
self.mid.get().map(Clone::clone)
self.mid.get().cloned()
}

/// kind returns RTPTransceiver's kind.
Expand Down
2 changes: 2 additions & 0 deletions webrtc/src/rtp_transceiver/rtp_receiver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ impl RTCRtpReceiver {
if tracks.len() != 1 {
None
} else {
// Clippy bug (reported at https://github.com/rust-lang/rust-clippy/issues/12560) suggests .first().cloned()
#[allow(clippy::map_clone)]
tracks.first().map(|t| Arc::clone(&t.track))
}
}
Expand Down

0 comments on commit e8d498a

Please sign in to comment.