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