diff --git a/src/client.rs b/src/client.rs index 1ed336b..e4f15db 100644 --- a/src/client.rs +++ b/src/client.rs @@ -442,7 +442,7 @@ mod tests { }); receiver - .recv_timeout(Duration::from_secs(5)) + .recv_timeout(some(Duration::from_secs(5))) .expect("Can't start local listener"); let now = Instant::now(); diff --git a/src/config.rs b/src/config.rs index 47da1f9..e4c5770 100644 --- a/src/config.rs +++ b/src/config.rs @@ -55,8 +55,8 @@ impl ConfigBuilder { } /// Sets the timeout - pub fn timeout(mut self, timeout: Option) -> Self { - self.config.timeout = timeout.map(|t| Duration::from_secs(t as u64)); + pub fn timeout(mut self, timeout: Option) -> Self { + self.config.timeout = timeout; self }