diff --git a/substrate/client/consensus/babe/src/lib.rs b/substrate/client/consensus/babe/src/lib.rs index 9ad50eb9c0..19d9e37cf2 100644 --- a/substrate/client/consensus/babe/src/lib.rs +++ b/substrate/client/consensus/babe/src/lib.rs @@ -753,7 +753,7 @@ where slot: Slot, epoch_descriptor: &ViableEpochDescriptor, Epoch>, ) { - self.slot_notification_sinks.lock().retain_mut(|sink| { + RetainMut::retain_mut(&mut *self.slot_notification_sinks.lock(), |sink| { match sink.try_send((slot, epoch_descriptor.clone())) { Ok(()) => true, Err(e) => diff --git a/substrate/client/transaction-pool/src/graph/validated_pool.rs b/substrate/client/transaction-pool/src/graph/validated_pool.rs index 7e19941b25..4ddaf8de5c 100644 --- a/substrate/client/transaction-pool/src/graph/validated_pool.rs +++ b/substrate/client/transaction-pool/src/graph/validated_pool.rs @@ -203,7 +203,7 @@ impl ValidatedPool { let imported = self.pool.write().import(tx)?; if let base::Imported::Ready { ref hash, .. } = imported { - self.import_notification_sinks.lock().retain_mut(|sink| { + RetainMut::retain_mut(&mut *self.import_notification_sinks.lock(), |sink| { match sink.try_send(*hash) { Ok(()) => true, Err(e) =>