Skip to content

Commit

Permalink
fix clippy/fmt/test
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc authored and yngrtc committed Jun 12, 2023
1 parent a166fff commit 81c7b56
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions media/src/io/ivf_writer/ivf_writer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn test_ivf_writer_add_packet_and_close() -> Result<()> {
csrc: vec![],
padding: false,
extensions: vec![],
extensions_padding: 0,
},
payload: raw_valid_pkt.slice(20..),
};
Expand Down Expand Up @@ -51,6 +52,7 @@ fn test_ivf_writer_add_packet_and_close() -> Result<()> {
csrc: vec![],
padding: raw_mid_part_pkt.len() % 4 != 0,
extensions: vec![],
extensions_padding: 0,
},
payload: raw_mid_part_pkt.slice(20..),
};
Expand Down Expand Up @@ -78,6 +80,7 @@ fn test_ivf_writer_add_packet_and_close() -> Result<()> {
csrc: vec![],
padding: raw_keyframe_pkt.len() % 4 != 0,
extensions: vec![],
extensions_padding: 0,
},
payload: raw_keyframe_pkt.slice(20..),
};
Expand Down
1 change: 1 addition & 0 deletions media/src/io/ogg_writer/ogg_writer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn test_ogg_writer_add_packet_and_close() -> Result<()> {
csrc: vec![],
padding: false,
extensions: vec![],
extensions_padding: 0,
},
payload: raw_pkt.slice(20..),
};
Expand Down
5 changes: 1 addition & 4 deletions media/src/io/sample_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,7 @@ impl<T: Depacketizer> SampleBuilder<T> {
if self.prepared.empty() {
return None;
}
let result = std::mem::replace(
&mut self.prepared_samples[self.prepared.head as usize],
None,
);
let result = self.prepared_samples[self.prepared.head as usize].take();
self.prepared.head = self.prepared.head.wrapping_add(1);
result
}
Expand Down
4 changes: 2 additions & 2 deletions rtp/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct Header {
pub csrc: Vec<u32>,
pub extension_profile: u16,
pub extensions: Vec<Extension>,
pub extensions_padding: usize
pub extensions_padding: usize,
}

impl Unmarshal for Header {
Expand Down Expand Up @@ -197,7 +197,7 @@ impl Unmarshal for Header {
csrc,
extension_profile,
extensions,
extensions_padding
extensions_padding,
})
}
}
Expand Down
1 change: 1 addition & 0 deletions rtp/src/packetizer/packetizer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fn test_packetizer_abs_send_time() -> Result<()> {
id: 1,
payload: Bytes::from_static(&[0x40, 0, 0]),
}],
extensions_padding: 0,
},
payload: Bytes::from_static(&[0x11, 0x12, 0x13, 0x14]),
};
Expand Down

0 comments on commit 81c7b56

Please sign in to comment.