File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ cfg_if! {
113
113
use crate :: stream:: FromStream ;
114
114
115
115
pub use merge:: Merge ;
116
- pub use timeout:: TimeoutStream ;
116
+ pub use timeout:: Timeout ;
117
117
}
118
118
}
119
119
@@ -1074,11 +1074,11 @@ extension_trait! {
1074
1074
"# ]
1075
1075
#[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
1076
1076
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
1077
- fn timeout( self , dur: Duration ) -> TimeoutStream <Self >
1077
+ fn timeout( self , dur: Duration ) -> Timeout <Self >
1078
1078
where
1079
1079
Self : Stream + Sized ,
1080
1080
{
1081
- TimeoutStream :: new( self , dur)
1081
+ Timeout :: new( self , dur)
1082
1082
}
1083
1083
1084
1084
#[ doc = r#"
Original file line number Diff line number Diff line change @@ -11,23 +11,23 @@ use crate::task::{Context, Poll};
11
11
12
12
#[ doc( hidden) ]
13
13
#[ derive( Debug ) ]
14
- pub struct TimeoutStream < S > {
14
+ pub struct Timeout < S : Stream > {
15
15
stream : S ,
16
16
delay : Delay ,
17
17
}
18
18
19
- impl < S > TimeoutStream < S > {
19
+ impl < S : Stream > Timeout < S > {
20
20
pin_utils:: unsafe_pinned!( stream: S ) ;
21
21
pin_utils:: unsafe_pinned!( delay: Delay ) ;
22
22
23
- pub fn new ( stream : S , dur : Duration ) -> TimeoutStream < S > {
23
+ pub fn new ( stream : S , dur : Duration ) -> Timeout < S > {
24
24
let delay = Delay :: new ( dur) ;
25
25
26
- TimeoutStream { stream, delay }
26
+ Timeout { stream, delay }
27
27
}
28
28
}
29
29
30
- impl < S : Stream > Stream for TimeoutStream < S > {
30
+ impl < S : Stream > Stream for Timeout < S > {
31
31
type Item = Result < S :: Item , TimeoutError > ;
32
32
33
33
fn poll_next ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Option < Self :: Item > > {
You can’t perform that action at this time.
0 commit comments