Skip to content

Commit 7bd5114

Browse files
author
yngrtc
committed
fix clippy
1 parent de46a53 commit 7bd5114

File tree

7 files changed

+9
-16
lines changed

7 files changed

+9
-16
lines changed

media/src/io/ogg_writer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl<W: Write + Seek> OggWriter<W> {
127127
) -> Result<()> {
128128
self.last_payload_size = payload.len();
129129
self.last_payload = payload.clone();
130-
let n_segments = (self.last_payload_size + 255 - 1) / 255;
130+
let n_segments = self.last_payload_size.div_ceil(255);
131131

132132
let mut page =
133133
Vec::with_capacity(PAGE_HEADER_SIZE + 1 + self.last_payload_size + n_segments);

media/src/io/sample_builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ impl<T: Depacketizer> SampleBuilder<T> {
391391
}
392392
}
393393

394-
/// Computes the distance between two sequence numbers
394+
// Computes the distance between two sequence numbers
395395
/*pub(crate) fn seqnum_distance(head: u16, tail: u16) -> u16 {
396396
if head > tail {
397397
head.wrapping_add(tail)

rtp/src/codecs/h265/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ impl Payloader for HevcPayloader {
234234
///
235235
/// Network Abstraction Unit Header implementation
236236
///
237-
238237
const H265NALU_HEADER_SIZE: usize = 2;
239238
/// <https://datatracker.ietf.org/doc/html/rfc7798#section-4.4.2>
240239
const H265NALU_AGGREGATION_PACKET_TYPE: u8 = 48;
@@ -626,10 +625,8 @@ impl H265AggregationPacket {
626625
}
627626
}
628627

629-
///
630628
/// Fragmentation Unit implementation
631629
///
632-
633630
/// H265FragmentationUnitHeader is a H265 FU Header
634631
/// +---------------+
635632
/// |0|1|2|3|4|5|6|7|
@@ -759,7 +756,6 @@ impl H265FragmentationUnitPacket {
759756
///
760757
/// PACI implementation
761758
///
762-
763759
/// H265PACIPacket represents a single H265 PACI packet.
764760
///
765761
/// 0 1 2 3
@@ -908,7 +904,6 @@ impl H265PACIPacket {
908904
///
909905
/// Temporal Scalability Control Information
910906
///
911-
912907
/// H265TSCI is a Temporal Scalability Control Information header extension.
913908
///
914909
/// ## Specifications
@@ -976,7 +971,6 @@ impl Default for H265Payload {
976971
///
977972
/// Packet implementation
978973
///
979-
980974
/// H265Packet represents a H265 packet, stored in the payload of an RTP packet.
981975
#[derive(Default, Debug, Clone, PartialEq, Eq)]
982976
pub struct H265Packet {

sdp/src/description/session.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ impl fmt::Display for SessionDescription {
293293
impl SessionDescription {
294294
/// API to match draft-ietf-rtcweb-jsep
295295
/// Move to webrtc or its own package?
296-
297296
/// NewJSEPSessionDescription creates a new SessionDescription with
298297
/// some settings that are required by the JSEP spec.
299298
pub fn new_jsep_session_description(identity: bool) -> Self {

srtp/src/cipher/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::error::Result;
2727
///> aeadAuthTagLen=16
2828
///
2929
///See https://tools.ietf.org/html/rfc7714 for the full specifications.
30-
30+
///
3131
/// Cipher represents a implementation of one
3232
/// of the SRTP Specific ciphers.
3333
pub(crate) trait Cipher {

util/src/sync/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ impl<T> Mutex<T> {
2727
/// dropped (falls out of scope), the lock will be unlocked.
2828
pub struct MutexGuard<'a, T>(sync::MutexGuard<'a, T>);
2929

30-
impl<'a, T> ops::Deref for MutexGuard<'a, T> {
30+
impl<T> ops::Deref for MutexGuard<'_, T> {
3131
type Target = T;
3232

3333
fn deref(&self) -> &Self::Target {
3434
&self.0
3535
}
3636
}
3737

38-
impl<'a, T> ops::DerefMut for MutexGuard<'a, T> {
38+
impl<T> ops::DerefMut for MutexGuard<'_, T> {
3939
fn deref_mut(&mut self) -> &mut Self::Target {
4040
&mut self.0
4141
}
@@ -72,7 +72,7 @@ impl<T> RwLock<T> {
7272
/// dropped.
7373
pub struct RwLockReadGuard<'a, T>(sync::RwLockReadGuard<'a, T>);
7474

75-
impl<'a, T> ops::Deref for RwLockReadGuard<'a, T> {
75+
impl<T> ops::Deref for RwLockReadGuard<'_, T> {
7676
type Target = T;
7777

7878
fn deref(&self) -> &Self::Target {
@@ -84,15 +84,15 @@ impl<'a, T> ops::Deref for RwLockReadGuard<'a, T> {
8484
/// dropped.
8585
pub struct RwLockWriteGuard<'a, T>(sync::RwLockWriteGuard<'a, T>);
8686

87-
impl<'a, T> ops::Deref for RwLockWriteGuard<'a, T> {
87+
impl<T> ops::Deref for RwLockWriteGuard<'_, T> {
8888
type Target = T;
8989

9090
fn deref(&self) -> &Self::Target {
9191
&self.0
9292
}
9393
}
9494

95-
impl<'a, T> ops::DerefMut for RwLockWriteGuard<'a, T> {
95+
impl<T> ops::DerefMut for RwLockWriteGuard<'_, T> {
9696
fn deref_mut(&mut self) -> &mut Self::Target {
9797
&mut self.0
9898
}

webrtc/src/mux/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::mux::mux_func::MatchFunc;
1818
use crate::util::Error;
1919

2020
/// mux multiplexes packets on a single socket (RFC7983)
21-
21+
///
2222
/// The maximum amount of data that can be buffered before returning errors.
2323
const MAX_BUFFER_SIZE: usize = 1000 * 1000; // 1MB
2424

0 commit comments

Comments
 (0)