File tree Expand file tree Collapse file tree 4 files changed +5
-33
lines changed Expand file tree Collapse file tree 4 files changed +5
-33
lines changed Original file line number Diff line number Diff line change @@ -87,17 +87,17 @@ impl RequestOptions {
87
87
fn to_wasi ( & self ) -> Result < WasiRequestOptions > {
88
88
let wasi = WasiRequestOptions :: new ( ) ;
89
89
if let Some ( timeout) = self . connect_timeout {
90
- wasi. set_connect_timeout ( Some ( * timeout) ) . map_err ( |( ) | {
90
+ wasi. set_connect_timeout ( Some ( timeout. 0 ) ) . map_err ( |( ) | {
91
91
Error :: other ( "wasi-http implementation does not support connect timeout option" )
92
92
} ) ?;
93
93
}
94
94
if let Some ( timeout) = self . first_byte_timeout {
95
- wasi. set_first_byte_timeout ( Some ( * timeout) ) . map_err ( |( ) | {
95
+ wasi. set_first_byte_timeout ( Some ( timeout. 0 ) ) . map_err ( |( ) | {
96
96
Error :: other ( "wasi-http implementation does not support first byte timeout option" )
97
97
} ) ?;
98
98
}
99
99
if let Some ( timeout) = self . between_bytes_timeout {
100
- wasi. set_between_bytes_timeout ( Some ( * timeout) )
100
+ wasi. set_between_bytes_timeout ( Some ( timeout. 0 ) )
101
101
. map_err ( |( ) | {
102
102
Error :: other (
103
103
"wasi-http implementation does not support between byte timeout option" ,
Original file line number Diff line number Diff line change @@ -107,20 +107,6 @@ impl Duration {
107
107
}
108
108
}
109
109
110
- impl std:: ops:: Deref for Duration {
111
- type Target = monotonic_clock:: Duration ;
112
-
113
- fn deref ( & self ) -> & Self :: Target {
114
- & self . 0
115
- }
116
- }
117
-
118
- impl std:: ops:: DerefMut for Duration {
119
- fn deref_mut ( & mut self ) -> & mut Self :: Target {
120
- & mut self . 0
121
- }
122
- }
123
-
124
110
impl From < std:: time:: Duration > for Duration {
125
111
fn from ( inner : std:: time:: Duration ) -> Self {
126
112
Self (
Original file line number Diff line number Diff line change @@ -67,20 +67,6 @@ impl SubAssign<Duration> for Instant {
67
67
}
68
68
}
69
69
70
- impl std:: ops:: Deref for Instant {
71
- type Target = monotonic_clock:: Instant ;
72
-
73
- fn deref ( & self ) -> & Self :: Target {
74
- & self . 0
75
- }
76
- }
77
-
78
- impl std:: ops:: DerefMut for Instant {
79
- fn deref_mut ( & mut self ) -> & mut Self :: Target {
80
- & mut self . 0
81
- }
82
- }
83
-
84
70
impl IntoFuture for Instant {
85
71
type Output = Instant ;
86
72
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ impl Timer {
61
61
Timer ( None )
62
62
}
63
63
pub fn at ( deadline : Instant ) -> Timer {
64
- let pollable = Reactor :: current ( ) . schedule ( subscribe_instant ( * deadline) ) ;
64
+ let pollable = Reactor :: current ( ) . schedule ( subscribe_instant ( deadline. 0 ) ) ;
65
65
Timer ( Some ( pollable) )
66
66
}
67
67
pub fn after ( duration : Duration ) -> Timer {
68
- let pollable = Reactor :: current ( ) . schedule ( subscribe_duration ( * duration) ) ;
68
+ let pollable = Reactor :: current ( ) . schedule ( subscribe_duration ( duration. 0 ) ) ;
69
69
Timer ( Some ( pollable) )
70
70
}
71
71
pub fn set_after ( & mut self , duration : Duration ) {
You can’t perform that action at this time.
0 commit comments