client: Mark futures returned by send_matrix_request as Send

This commit is contained in:
Emily Dietrich 2022-08-30 20:49:03 +02:00 committed by GitHub
parent 5ccee2d1b0
commit 9e3ac10c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ pub trait HttpClientExt: HttpClient {
access_token: SendAccessToken<'_>,
for_versions: &[MatrixVersion],
request: R,
) -> Pin<Box<dyn Future<Output = ResponseResult<Self, R>> + 'a>> {
) -> Pin<Box<dyn Future<Output = ResponseResult<Self, R>> + 'a + Send>> {
self.send_customized_matrix_request(
homeserver_url,
access_token,
@ -88,7 +88,7 @@ pub trait HttpClientExt: HttpClient {
for_versions: &[MatrixVersion],
request: R,
customize: F,
) -> Pin<Box<dyn Future<Output = ResponseResult<Self, R>> + 'a>>
) -> Pin<Box<dyn Future<Output = ResponseResult<Self, R>> + 'a + Send>>
where
R: OutgoingRequest + 'a,
F: FnOnce(&mut http::Request<Self::RequestBody>) -> Result<(), ResponseError<Self, R>> + 'a,