diff --git a/matrix_sdk/src/http_client.rs b/matrix_sdk/src/http_client.rs index 000e8e36..45793a23 100644 --- a/matrix_sdk/src/http_client.rs +++ b/matrix_sdk/src/http_client.rs @@ -15,12 +15,12 @@ use std::{convert::TryFrom, sync::Arc}; use http::{HeaderValue, Method as HttpMethod, Response as HttpResponse}; +use matrix_sdk_common::{locks::RwLock, FromHttpResponseError}; +use matrix_sdk_common_macros::async_trait; use reqwest::{Client, Response}; use tracing::trace; use url::Url; -use matrix_sdk_common::{locks::RwLock, FromHttpResponseError}; - use crate::{ClientConfig, Endpoint, Error, HttpSend, Result, Session}; #[derive(Clone, Debug)] @@ -141,13 +141,17 @@ impl DefaultHttpClient { http_client.default_headers(headers) }; + #[cfg(target_arch = "wasm32")] + #[allow(unused)] + let _ = config; + Ok(Self { inner: http_client.build()?, }) } } -#[async_trait::async_trait] +#[async_trait] impl HttpSend for DefaultHttpClient { async fn send_request(&self, request: http::Request>) -> Result { Ok(self