Skip to content

Commit 385ae6e

Browse files
committed
chore(dcipher-network): clippy fixes
1 parent 81e9035 commit 385ae6e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

crates/network/src/topic/dispatcher.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ where
223223
let (_, receiver) = channels_get_or_insert(topic.clone(), &mut channels);
224224

225225
// if a receiver for that topic has already been taken, return None
226-
let Some(receiver) = receiver.take() else {
227-
return None;
228-
};
229-
226+
let receiver = receiver.take()?;
230227
// Create a new receiver stream
231228
let receiver_stream = BroadcastStream::new(receiver);
232229

@@ -290,9 +287,9 @@ where
290287
}
291288

292289
/// Helper used to get an existing entry, or insert a value into a locked [`ChannelsMap`]
293-
fn channels_get_or_insert<'a, 'b, I, M>(
290+
fn channels_get_or_insert<'a, I, M>(
294291
topic: Cow<'static, [u8]>,
295-
channels: &'a mut std::sync::MutexGuard<'b, ChannelsMap<I, M>>,
292+
channels: &'a mut std::sync::MutexGuard<'_, ChannelsMap<I, M>>,
296293
) -> &'a mut ChannelsMapEntry<I, M>
297294
where
298295
I: PartyIdentifier,

0 commit comments

Comments
 (0)