Skip to content

Commit dea95f0

Browse files
committed
fixup: flatten
1 parent 82f0ea5 commit dea95f0

File tree

1 file changed

+2
-1
lines changed
  • mullvad-relay-selector/src/relay_selector

1 file changed

+2
-1
lines changed

mullvad-relay-selector/src/relay_selector/helpers.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ pub fn select_random_port<R: RangeBounds<u16> + Iterator<Item = u16> + Clone>(
203203
) -> Result<u16, Error> {
204204
port_ranges
205205
.iter()
206-
.flat_map(|range| range.clone())
206+
.cloned()
207+
.flatten()
207208
.choose(&mut rand::thread_rng())
208209
.ok_or(Error::NoMatchingPort)
209210
}

0 commit comments

Comments
 (0)