Skip to content

Commit 5ef5e5b

Browse files
committed
Fix TimeoutError
1 parent 7a87dea commit 5ef5e5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/stream/stream/timeout.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<S: Stream> Stream for TimeoutStream<S> {
3535
Poll::Ready(Some(v)) => Poll::Ready(Some(Ok(v))),
3636
Poll::Ready(None) => Poll::Ready(None),
3737
Poll::Pending => match self.delay().poll(cx) {
38-
Poll::Ready(_) => Poll::Ready(Some(Err(TimeoutError))),
38+
Poll::Ready(_) => Poll::Ready(Some(Err(TimeoutError { _private: () }))),
3939
Poll::Pending => Poll::Pending,
4040
},
4141
}
@@ -46,7 +46,9 @@ impl<S: Stream> Stream for TimeoutStream<S> {
4646
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
4747
#[cfg(any(feature = "unstable", feature = "docs"))]
4848
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
49-
pub struct TimeoutError;
49+
struct TimeoutError {
50+
_private: (),
51+
}
5052

5153
impl Error for TimeoutError {}
5254

0 commit comments

Comments
 (0)