File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,9 @@ mod tests {
448448 let now = Instant :: now ( ) ;
449449 let client = Client :: from_config (
450450 & endpoint,
451- crate :: config:: ConfigBuilder :: new ( ) . timeout ( Some ( 5 ) ) . build ( ) ,
451+ crate :: config:: ConfigBuilder :: new ( )
452+ . timeout ( Some ( Duration :: from_secs ( 5 ) ) )
453+ . build ( ) ,
452454 ) ;
453455 let elapsed = now. elapsed ( ) ;
454456
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ impl ConfigBuilder {
5555 }
5656
5757 /// Sets the timeout
58- pub fn timeout ( mut self , timeout : Option < u8 > ) -> Self {
59- self . config . timeout = timeout. map ( |t| Duration :: from_secs ( t as u64 ) ) ;
58+ pub fn timeout ( mut self , timeout : Option < Duration > ) -> Self {
59+ self . config . timeout = timeout;
6060 self
6161 }
6262
You can’t perform that action at this time.
0 commit comments