Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a2dc753

Browse files
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

Lines changed: 8 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /