File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,17 +87,17 @@ impl RequestOptions {
8787 fn to_wasi ( & self ) -> Result < WasiRequestOptions > {
8888 let wasi = WasiRequestOptions :: new ( ) ;
8989 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 ( |( ) | {
9191 Error :: other ( "wasi-http implementation does not support connect timeout option" )
9292 } ) ?;
9393 }
9494 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 ( |( ) | {
9696 Error :: other ( "wasi-http implementation does not support first byte timeout option" )
9797 } ) ?;
9898 }
9999 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 ) )
101101 . map_err ( |( ) | {
102102 Error :: other (
103103 "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 {
107107 }
108108}
109109
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-
124110impl From < std:: time:: Duration > for Duration {
125111 fn from ( inner : std:: time:: Duration ) -> Self {
126112 Self (
Original file line number Diff line number Diff line change @@ -67,20 +67,6 @@ impl SubAssign<Duration> for Instant {
6767 }
6868}
6969
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-
8470impl IntoFuture for Instant {
8571 type Output = Instant ;
8672
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ impl Timer {
6161 Timer ( None )
6262 }
6363 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 ) ) ;
6565 Timer ( Some ( pollable) )
6666 }
6767 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 ) ) ;
6969 Timer ( Some ( pollable) )
7070 }
7171 pub fn set_after ( & mut self , duration : Duration ) {
You can’t perform that action at this time.
0 commit comments