From 9234ac96e11da9392fa832ea9b2619e3d132a886 Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Tue, 11 Aug 2020 09:17:18 -0400 Subject: [PATCH] matrix_sdk: Use our version of the async_trait macro --- matrix_sdk/src/http_client.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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