chore: clippy fixes - allow should_implement_trait and collapse nested if

This commit is contained in:
2026-05-25 12:19:24 +02:00
parent b1e7dea739
commit 9d5d8f04a2
3 changed files with 12 additions and 11 deletions
+1
View File
@@ -16,6 +16,7 @@ impl Backoff {
}
}
#[allow(clippy::should_implement_trait)]
pub fn next(&mut self) -> Duration {
let next = match self.current {
None => self.initial,
+11 -11
View File
@@ -359,20 +359,20 @@ async fn reload(reg: &Registry) -> Result<ReloadResult, ApiError> {
let mut unchanged = Vec::new();
for name in &existing_names {
if !new_by_name.contains_key(name) {
if let Some(entry) = reg.remove(name).await {
let (tx, rx) = oneshot::channel();
if !new_by_name.contains_key(name)
&& let Some(entry) = reg.remove(name).await
{
let (tx, rx) = oneshot::channel();
let _ = entry
.handle
.tx
.send(SupervisorCmd::Shutdown { ack: tx })
.await;
let _ = entry
.handle
.tx
.send(SupervisorCmd::Shutdown { ack: tx })
.await;
let _ = rx.await;
let _ = rx.await;
removed.push(name.clone());
}
removed.push(name.clone());
}
}
BIN
View File
Binary file not shown.