Skip to content

Commit

Permalink
Remove P: Unpin bound on impl Stream for Pin
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Dec 17, 2021
1 parent 23c2723 commit 5c77116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/stream/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
#[unstable(feature = "async_stream", issue = "79024")]
impl<P> Stream for Pin<P>
where
P: DerefMut + Unpin,
P: DerefMut,
P::Target: Stream,
{
type Item = <P::Target as Stream>::Item;

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

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

0 comments on commit 5c77116

Please sign in to comment.