|
13 | 13 | //! # async { |
14 | 14 | //! # type HttpClient = ruma_client::http_client::Dummy; |
15 | 15 | //! let homeserver_url = "https://example.com".to_owned(); |
16 | | -//! let client = ruma_client::Client::builder() |
17 | | -//! .homeserver_url(homeserver_url) |
18 | | -//! .build::<HttpClient>() |
19 | | -//! .await?; |
| 16 | +//! let client = |
| 17 | +//! ruma_client::Client::builder().homeserver_url(homeserver_url).build::<HttpClient>().await?; |
20 | 18 | //! |
21 | | -//! let session = client |
22 | | -//! .log_in("@alice:example.com", "secret", None, None) |
23 | | -//! .await?; |
| 19 | +//! let session = client.log_in("@alice:example.com", "secret", None, None).await?; |
24 | 20 | //! |
25 | 21 | //! // You're now logged in! Write the session to a file if you want to restore it later. |
26 | 22 | //! // Then start using the API! |
@@ -106,7 +102,7 @@ use std::{any::type_name, future::Future}; |
106 | 102 | #[doc(no_inline)] |
107 | 103 | pub use ruma; |
108 | 104 | use ruma::{ |
109 | | - api::{MatrixVersion, OutgoingRequest, SendAccessToken}, |
| 105 | + api::{OutgoingRequest, SendAccessToken, SupportedVersions}, |
110 | 106 | UserId, |
111 | 107 | }; |
112 | 108 | use tracing::{info_span, Instrument}; |
@@ -135,7 +131,7 @@ fn send_customized_request<'a, C, R, F>( |
135 | 131 | http_client: &'a C, |
136 | 132 | homeserver_url: &str, |
137 | 133 | send_access_token: SendAccessToken<'_>, |
138 | | - for_versions: &[MatrixVersion], |
| 134 | + for_versions: &SupportedVersions, |
139 | 135 | request: R, |
140 | 136 | customize: F, |
141 | 137 | ) -> impl Future<Output = ResponseResult<C, R>> + Send + 'a |
|
0 commit comments