diff --git a/node/network/availability-recovery/src/lib.rs b/node/network/availability-recovery/src/lib.rs index efd8d3712851..ccbeba620472 100644 --- a/node/network/availability-recovery/src/lib.rs +++ b/node/network/availability-recovery/src/lib.rs @@ -806,8 +806,8 @@ impl AvailabilityRecoverySubsystem { } } } - output = state.interactions.next() => { - if let Some((candidate_hash, result)) = output.flatten() { + output = state.interactions.select_next_some() => { + if let Some((candidate_hash, result)) = output { state.availability_lru.put(candidate_hash, result); } } diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 709855e353af..128733088ba7 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -1138,10 +1138,8 @@ pub(crate) async fn run( _ = next_inactivity_stream.next() => { disconnect_inactive_peers(&mut ctx, &eviction_policy, &state.peer_data).await; } - res = state.collation_fetches.next() => { - if let Some(res) = res { - handle_collation_fetched_result(&mut ctx, &mut state, res).await; - } + res = state.collation_fetches.select_next_some() => { + handle_collation_fetched_result(&mut ctx, &mut state, res).await; } }