From 9bbad7059280946d9f577ab46981896d36f0f512 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 28 Apr 2021 14:05:29 +0200 Subject: [PATCH] client: Use ResponseResult type alias in more places --- ruma-client/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ruma-client/src/lib.rs b/ruma-client/src/lib.rs index 2a8cbc55..ea86cdb9 100644 --- a/ruma-client/src/lib.rs +++ b/ruma-client/src/lib.rs @@ -155,10 +155,7 @@ impl Client { impl Client { /// Makes a request to a Matrix API endpoint. - pub async fn send_request( - &self, - request: R, - ) -> Result> { + pub async fn send_request(&self, request: R) -> ResponseResult { self.send_customized_request(request, |_| {}).await } @@ -167,7 +164,7 @@ impl Client { &self, request: R, customize: F, - ) -> Result> + ) -> ResponseResult where R: OutgoingRequest, F: FnOnce(&mut http::Request), @@ -195,7 +192,7 @@ fn send_customized_request<'a, C, R, F>( send_access_token: SendAccessToken<'_>, request: R, customize: F, -) -> impl Future>> + Send + 'a +) -> impl Future> + Send + 'a where C: HttpClient + ?Sized, R: OutgoingRequest,