chore: Clippy lints and compile fixes.

This commit is contained in:
parazyd
2023-08-25 19:28:08 +02:00
parent 41631701ac
commit 2b7dd67309
8 changed files with 19 additions and 8 deletions

View File

@@ -574,8 +574,7 @@ impl PeerDiscovery {
let wakeup_end = Instant::now();
let epsilon = Duration::from_millis(200);
let sleep_was_instant = wakeup_end - wakeup_start <= epsilon;
sleep_was_instant
wakeup_end - wakeup_start <= epsilon
}
fn notify(&self) {

View File

@@ -72,6 +72,12 @@ impl CondVar {
}
}
impl Default for CondVar {
fn default() -> Self {
Self::new()
}
}
pub struct CondVarWait<'a> {
state: &'a Mutex<CondVarState>,
}

View File

@@ -91,3 +91,9 @@ impl<Parent> LazyWeak<Parent> {
self.0.get().unwrap().upgrade().unwrap()
}
}
impl<Parent> Default for LazyWeak<Parent> {
fn default() -> Self {
Self::new()
}
}