Chore: Clippy fixes for new lints

This commit is contained in:
Kyle Simpson
2021-06-14 23:27:57 +01:00
parent d6d6acabe1
commit be3030932e
5 changed files with 6 additions and 6 deletions

View File

@@ -144,7 +144,7 @@ impl Connection {
let address_str = std::str::from_utf8(&view.get_address_raw()[..nul_byte_index]) let address_str = std::str::from_utf8(&view.get_address_raw()[..nul_byte_index])
.map_err(|_| Error::IllegalIp)?; .map_err(|_| Error::IllegalIp)?;
let address = IpAddr::from_str(&address_str).map_err(|e| { let address = IpAddr::from_str(address_str).map_err(|e| {
println!("{:?}", e); println!("{:?}", e);
Error::IllegalIp Error::IllegalIp
})?; })?;

View File

@@ -66,7 +66,7 @@ impl Ord for EventData {
.as_ref() .as_ref()
.expect("T2 known to be well-defined by above."); .expect("T2 known to be well-defined by above.");
t1.cmp(&t2) t1.cmp(t2)
} else { } else {
Ordering::Equal Ordering::Equal
} }

View File

@@ -210,7 +210,7 @@ impl GlobalEvents {
.expect("Missing handle index for Tick (local timed)."); .expect("Missing handle index for Tick (local timed).");
event_store event_store
.process_timed(state.play_time, EventContext::Track(&[(&state, &handle)])) .process_timed(state.play_time, EventContext::Track(&[(state, handle)]))
.await; .await;
} }
} }
@@ -238,7 +238,7 @@ impl GlobalEvents {
.process_untimed( .process_untimed(
state.position, state.position,
untimed, untimed,
EventContext::Track(&[(&state, &handle)]), EventContext::Track(&[(state, handle)]),
) )
.await; .await;
} }

View File

@@ -174,7 +174,7 @@ impl Call {
self.leave().await?; self.leave().await?;
true true
} else if conn.0.channel_id() == channel_id { } else if conn.0.channel_id() == channel_id {
let _ = tx.send(completion_generator(&self)); let _ = tx.send(completion_generator(self));
false false
} else { } else {
// not in progress, and/or a channel change. // not in progress, and/or a channel change.

View File

@@ -20,7 +20,7 @@ impl ConnectionProgress {
pub(crate) fn get_connection_info(&self) -> Option<&ConnectionInfo> { pub(crate) fn get_connection_info(&self) -> Option<&ConnectionInfo> {
use ConnectionProgress::*; use ConnectionProgress::*;
match self { match self {
Complete(c) => Some(&c), Complete(c) => Some(c),
_ => None, _ => None,
} }
} }