Skip to content

Commit a2dc753

Browse files
committed
change type of peeked
1 parent 4f4a017 commit a2dc753

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/stream/stream/peekable.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ use crate::task::{Context, Poll};
77
#[allow(missing_debug_implementations)]
88
pub struct Peekable<S: Stream> {
99
stream: S,
10-
peeked: Option<Option<S::Item>>,
10+
peeked: Option<PeekFuture<Option<S::Item>>>,
11+
}
12+
13+
pub struct PeekFuture<'a, T: Unpin + ?Sized> {
14+
pub(crate) stream: &'a T,
15+
}
16+
17+
impl<T: Stream + Unpin + ?Sized> Future for PeekFuture<'_, T> {
1118
}
1219

1320

0 commit comments

Comments
 (0)