Skip to content

Commit 89d1d7c

Browse files
committed
fix clippy if let lint
1 parent 6712481 commit 89d1d7c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/channel.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ async fn clean_up_unused_channels(
5959
let mut channel_clients = state.channel_clients.lock().await;
6060

6161
if let Some(namespace_channels) = channel_clients.get_mut(&namespace) {
62-
if let Some((tx, _rx)) = namespace_channels.get(&channel_name) {
63-
if tx.sender_count() <= 1 && tx.receiver_count() <= 1 {
62+
if let Some((tx, _rx)) = namespace_channels.get(&channel_name)
63+
&& tx.sender_count() <= 1 && tx.receiver_count() <= 1 {
6464
namespace_channels.remove(&channel_name);
6565
}
66-
}
6766

6867
if namespace_channels.is_empty() {
6968
channel_clients.remove(&namespace);

0 commit comments

Comments
 (0)