Skip to content

Commit

Permalink
Simplify a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Nov 26, 2024
1 parent e936c38 commit 74fa35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/subspace-networking/src/utils/piece_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ where
.into_iter()
.take(num_pieces)
.enumerate()
.filter_map(|(peer_index, peer_id)| {
.map(|(peer_index, peer_id)| {
checked_peers.insert(peer_id);

// Inside to avoid division by zero in case there are no connected peers or pieces
Expand Down Expand Up @@ -633,7 +633,7 @@ where
.await
};

Some((piece_index, Box::pin(fut.into_stream()) as _))
(piece_index, Box::pin(fut.into_stream()) as _)
})
.collect::<StreamMap<_, _>>();

Expand Down

0 comments on commit 74fa35a

Please sign in to comment.