Browse Source

ircd: Clippy lint

parazyd 3 years ago
parent
commit
c2a308ccb6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      bin/ircd/src/buffers.rs

+ 4 - 0
bin/ircd/src/buffers.rs

@@ -301,6 +301,10 @@ impl UMsgs {
         self.msgs.lock().await.len()
         self.msgs.lock().await.len()
     }
     }
 
 
+    pub async fn is_empty(&self) -> bool {
+        self.msgs.lock().await.len() == 0
+    }
+
     pub async fn contains(&self, key: &str) -> bool {
     pub async fn contains(&self, key: &str) -> bool {
         self.msgs.lock().await.contains_key(key)
         self.msgs.lock().await.contains_key(key)
     }
     }