We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4891531 + 5c77116 commit e22aae0Copy full SHA for e22aae0
library/core/src/stream/stream.rs
@@ -95,13 +95,13 @@ impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
95
#[unstable(feature = "async_stream", issue = "79024")]
96
impl<P> Stream for Pin<P>
97
where
98
- P: DerefMut + Unpin,
+ P: DerefMut,
99
P::Target: Stream,
100
{
101
type Item = <P::Target as Stream>::Item;
102
103
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
104
- self.get_mut().as_mut().poll_next(cx)
+ <P::Target as Stream>::poll_next(self.as_deref_mut(), cx)
105
}
106
107
fn size_hint(&self) -> (usize, Option<usize>) {
0 commit comments