Skip to content

Commit

Permalink
wasm lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adamspofford-dfinity committed Aug 23, 2024
1 parent 400a6da commit 8d19b94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ic-agent/src/agent/http_transport/reqwest_transport.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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."),
)
Expand Down
5 changes: 1 addition & 4 deletions ic-agent/src/agent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
{
Expand Down

0 comments on commit 8d19b94

Please sign in to comment.