From 24498b7f373c9dc12ba2e65ecf23e865039e1e5c Mon Sep 17 00:00:00 2001 From: Muhamad Azamy Date: Fri, 5 Apr 2024 09:53:29 +0200 Subject: [PATCH] run clippy --- src/relay/api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay/api.rs b/src/relay/api.rs index 4df95d2..ebf9938 100644 --- a/src/relay/api.rs +++ b/src/relay/api.rs @@ -216,7 +216,7 @@ async fn federation( } async fn update_cache_relays(envelope: &Envelope, twin_db: &impl TwinDB) -> Result<()> { - if envelope.relays.len() == 0 { + if envelope.relays.is_empty() { return Ok(()); } let mut twin = twin_db @@ -333,7 +333,7 @@ impl Stream { .await? .ok_or_else(|| anyhow::Error::msg("unknown twin destination"))?; - update_cache_relays(&envelope, &self.twins).await?; + update_cache_relays(envelope, &self.twins).await?; if !twin .relay