diff --git a/futures-util/src/stream/try_stream/try_flatten_unordered.rs b/futures-util/src/stream/try_stream/try_flatten_unordered.rs index 25bdf2919b..26859871d3 100644 --- a/futures-util/src/stream/try_stream/try_flatten_unordered.rs +++ b/futures-util/src/stream/try_stream/try_flatten_unordered.rs @@ -137,7 +137,7 @@ where // will be polled out from the error stream. // As `TryFlattenUnordered` won't poll the base stream again unless waker will be called explicitly, we can be // sure that by returning `Poll::Pending` we exclude the ability to poll the base stream before the error will reach the caller. - if out.as_ref().map_or(false, |opt| matches!(opt, Either::Right(_))) { + if out.as_ref().map_or(false, |item| matches!(item, Either::Right(_))) { *this.last_item_is_error = true; }