Skip to content

Commit e22aae0

Browse files
authored
Rollup merge of #92020 - Folyd:stream-unpin, r=m-ou-se
Remove P: Unpin bound on impl Stream for Pin Similar to #81363.
2 parents 4891531 + 5c77116 commit e22aae0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/stream/stream.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
9595
#[unstable(feature = "async_stream", issue = "79024")]
9696
impl<P> Stream for Pin<P>
9797
where
98-
P: DerefMut + Unpin,
98+
P: DerefMut,
9999
P::Target: Stream,
100100
{
101101
type Item = <P::Target as Stream>::Item;
102102

103103
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
104-
self.get_mut().as_mut().poll_next(cx)
104+
<P::Target as Stream>::poll_next(self.as_deref_mut(), cx)
105105
}
106106

107107
fn size_hint(&self) -> (usize, Option<usize>) {

0 commit comments

Comments
 (0)