Skip to content

Commit e28998f

Browse files
Make tests pass and silence Clippy
1 parent b20d41a commit e28998f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/client.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/raw_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ mod test {
12491249
let client = RawClient::new(get_test_server(), None).unwrap();
12501250

12511251
let resp = client.relay_fee().unwrap();
1252-
assert_eq!(resp, 0.00001);
1252+
assert_eq!(resp, 0.000001);
12531253
}
12541254

12551255
#[test]

0 commit comments

Comments
 (0)