We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7664faf commit 7d5116fCopy full SHA for 7d5116f
2 files changed
src/client.rs
@@ -448,7 +448,9 @@ mod tests {
448
let now = Instant::now();
449
let client = Client::from_config(
450
&endpoint,
451
- crate::config::ConfigBuilder::new().timeout(Some(5)).build(),
+ crate::config::ConfigBuilder::new()
452
+ .timeout(Some(Duration::from_secs(5)))
453
+ .build(),
454
);
455
let elapsed = now.elapsed();
456
src/config.rs
@@ -55,8 +55,8 @@ impl ConfigBuilder {
55
}
56
57
/// 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));
+ pub fn timeout(mut self, timeout: Option<Duration>) -> Self {
+ self.config.timeout = timeout;
60
self
61
62
0 commit comments