Skip to content

Commit d897e47

Browse files
Fix clippy for 1.65.0
1 parent 4b638fa commit d897e47

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

ice/src/agent/agent_gather.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl Agent {
235235
return;
236236
}
237237

238-
let ips = local_interfaces(&net, &*interface_filter, &*ip_filter, &network_types).await;
238+
let ips = local_interfaces(&net, &interface_filter, &ip_filter, &network_types).await;
239239
for ip in ips {
240240
let mut mapped_ip = ip;
241241

ice/src/candidate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl CandidatePair {
314314
// maxUint32, this result would overflow uint64
315315
((1 << 32_u64) - 1) * u64::from(std::cmp::min(g, d))
316316
+ 2 * u64::from(std::cmp::max(g, d))
317-
+ if g > d { 1 } else { 0 }
317+
+ u64::from(g > d)
318318
}
319319

320320
pub async fn write(&self, b: &[u8]) -> Result<usize> {

media/src/io/sample_builder/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<T: Depacketizer> SampleBuilder<T> {
9494
i = i.wrapping_add(1);
9595
}
9696

97-
if found_head == None {
97+
if found_head.is_none() {
9898
return false;
9999
}
100100

@@ -107,7 +107,7 @@ impl<T: Depacketizer> SampleBuilder<T> {
107107
i = i.wrapping_sub(1);
108108
}
109109

110-
if found_tail == None {
110+
if found_tail.is_none() {
111111
return false;
112112
}
113113

turn/src/client/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl RelayConnObserver for ClientInternal {
103103
to: &str,
104104
ignore_result: bool,
105105
) -> Result<TransactionResult> {
106-
let tr_key = base64::encode(&msg.transaction_id.0);
106+
let tr_key = base64::encode(msg.transaction_id.0);
107107

108108
let mut tr = Transaction::new(TransactionConfig {
109109
key: tr_key.clone(),
@@ -341,7 +341,7 @@ impl ClientInternal {
341341
// - stun.ClassSuccessResponse
342342
// - stun.ClassErrorResponse
343343

344-
let tr_key = base64::encode(&msg.transaction_id.0);
344+
let tr_key = base64::encode(msg.transaction_id.0);
345345

346346
let mut tm = tr_map.lock().await;
347347
if tm.find(&tr_key).is_none() {

0 commit comments

Comments
 (0)