Skip to content

Commit 4c3acb0

Browse files
taiki-ecramertj
authored andcommitted
impl Unpin for AndThen and OrElse
1 parent 0a0ea51 commit 4c3acb0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

futures-util/src/try_stream/and_then.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ pub struct AndThen<St, Fut, F> {
1414
f: F,
1515
}
1616

17+
impl<St: Unpin, Fut: Unpin, F> Unpin for AndThen<St, Fut, F> {}
18+
1719
impl<St, Fut, F> AndThen<St, Fut, F>
1820
where St: TryStream,
1921
F: FnMut(St::Ok) -> Fut,

futures-util/src/try_stream/or_else.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ pub struct OrElse<St, Fut, F> {
1414
f: F,
1515
}
1616

17+
impl<St: Unpin, Fut: Unpin, F> Unpin for OrElse<St, Fut, F> {}
18+
1719
impl<St, Fut, F> OrElse<St, Fut, F>
1820
where St: TryStream,
1921
F: FnMut(St::Error) -> Fut,

0 commit comments

Comments
 (0)