From 8d19b943ceb1def52dc1e68dcca020caf9faa491 Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Thu, 22 Aug 2024 17:24:40 -0700 Subject: [PATCH] wasm lint --- ic-agent/src/agent/http_transport/reqwest_transport.rs | 4 ++-- ic-agent/src/agent/mod.rs | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ic-agent/src/agent/http_transport/reqwest_transport.rs b/ic-agent/src/agent/http_transport/reqwest_transport.rs index 2ce36791..4368e38d 100644 --- a/ic-agent/src/agent/http_transport/reqwest_transport.rs +++ b/ic-agent/src/agent/http_transport/reqwest_transport.rs @@ -1,7 +1,7 @@ //! This module has been deprecated in favor of builder methods on `AgentBuilder`. #![allow(deprecated)] pub use reqwest; -use std::{sync::Arc, time::Duration}; +use std::sync::Arc; use reqwest::Client; @@ -34,7 +34,7 @@ impl ReqwestTransport { url, Client::builder() .use_rustls_tls() - .timeout(Duration::from_secs(360)) + .timeout(std::time::Duration::from_secs(360)) .build() .expect("Could not create HTTP client."), ) diff --git a/ic-agent/src/agent/mod.rs b/ic-agent/src/agent/mod.rs index 9fb4d400..a739b9db 100644 --- a/ic-agent/src/agent/mod.rs +++ b/ic-agent/src/agent/mod.rs @@ -1144,10 +1144,7 @@ impl Agent { #[cfg(target_family = "wasm")] { let http_request = create_request_with_generated_url()?; - match self.client.execute(http_request).await { - Ok(response) => response, - Err(err) => return Err(AgentError::TransportError(Box::new(err))), - } + self.client.execute(http_request).await? } #[cfg(not(target_family = "wasm"))] {