matrix_sdk: Use our version of the async_trait macro
This commit is contained in:
parent
4770dc636a
commit
9234ac96e1
1 changed files with 7 additions and 3 deletions
|
@ -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<Vec<u8>>) -> Result<Response> {
|
||||
Ok(self
|
||||
|
|
Loading…
Reference in a new issue