Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change type of peeked
  • Loading branch information
starsheriff committed Oct 17, 2019
commit a2dc7530d02d5d1f05e453b4e8fcfe8b9ab8fe8c
9 changes: 8 additions & 1 deletion src/stream/stream/peekable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ use crate::task::{Context, Poll};
#[allow(missing_debug_implementations)]
pub struct Peekable<S: Stream> {
stream: S,
peeked: Option<Option<S::Item>>,
peeked: Option<PeekFuture<Option<S::Item>>>,
}

pub struct PeekFuture<'a, T: Unpin + ?Sized> {
pub(crate) stream: &'a T,
}

impl<T: Stream + Unpin + ?Sized> Future for PeekFuture<'_, T> {
}


Expand Down