Skip to content

Commit f0604c2

Browse files
MajorBreakfastcramertj
authored andcommitted
Add more Unpin bounds to FuturesUnordered::iter_mut
1 parent 0820382 commit f0604c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

futures-util/src/stream/futures_unordered/iter_mut.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::node::Node;
44

55
#[derive(Debug)]
66
/// Mutable iterator over all futures in the unordered set.
7-
pub struct IterMut<'a, F: 'a> {
7+
pub struct IterMut<'a, F: 'a + Unpin> {
88
pub(super) node: *const Node<F>,
99
pub(super) len: usize,
1010
pub(super) _marker: PhantomData<&'a mut FuturesUnordered<F>>

futures-util/src/stream/futures_unordered/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<T> FuturesUnordered<T> {
149149
}
150150

151151
/// Returns an iterator that allows modifying each future in the set.
152-
pub fn iter_mut(&mut self) -> IterMut<T> {
152+
pub fn iter_mut(&mut self) -> IterMut<T> where T: Unpin {
153153
IterMut {
154154
node: self.head_all,
155155
len: self.len,

0 commit comments

Comments
 (0)