Skip to content

Commit

Permalink
Fix clippy for 1.65.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lookback-hugotunius committed Nov 10, 2022
1 parent 4b638fa commit d897e47
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ice/src/agent/agent_gather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl Agent {
return;
}

let ips = local_interfaces(&net, &*interface_filter, &*ip_filter, &network_types).await;
let ips = local_interfaces(&net, &interface_filter, &ip_filter, &network_types).await;
for ip in ips {
let mut mapped_ip = ip;

Expand Down
2 changes: 1 addition & 1 deletion ice/src/candidate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl CandidatePair {
// maxUint32, this result would overflow uint64
((1 << 32_u64) - 1) * u64::from(std::cmp::min(g, d))
+ 2 * u64::from(std::cmp::max(g, d))
+ if g > d { 1 } else { 0 }
+ u64::from(g > d)
}

pub async fn write(&self, b: &[u8]) -> Result<usize> {
Expand Down
4 changes: 2 additions & 2 deletions media/src/io/sample_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<T: Depacketizer> SampleBuilder<T> {
i = i.wrapping_add(1);
}

if found_head == None {
if found_head.is_none() {
return false;
}

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

if found_tail == None {
if found_tail.is_none() {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions turn/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl RelayConnObserver for ClientInternal {
to: &str,
ignore_result: bool,
) -> Result<TransactionResult> {
let tr_key = base64::encode(&msg.transaction_id.0);
let tr_key = base64::encode(msg.transaction_id.0);

let mut tr = Transaction::new(TransactionConfig {
key: tr_key.clone(),
Expand Down Expand Up @@ -341,7 +341,7 @@ impl ClientInternal {
// - stun.ClassSuccessResponse
// - stun.ClassErrorResponse

let tr_key = base64::encode(&msg.transaction_id.0);
let tr_key = base64::encode(msg.transaction_id.0);

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

0 comments on commit d897e47

Please sign in to comment.