Skip to content

Commit d860749

Browse files
jmartinespHywan
authored andcommitted
Revert "doc: Add warnings about overriding the server URL"
This reverts commit 95d8ba9.
1 parent 012a982 commit d860749

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

bindings/matrix-sdk-ffi/src/client_builder.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -221,54 +221,18 @@ impl ClientBuilder {
221221
Arc::new(builder)
222222
}
223223

224-
/// Set the server name to discover the homeserver from.
225-
///
226-
/// We assume we can connect in HTTPS to that server.
227-
///
228-
/// The following methods are mutually exclusive: [`Self::homeserver_url`],
229-
/// [`Self::server_name`],
230-
/// [`Self::server_name_or_homeserver_url`].
231-
/// If you set more than one, then whatever was set last will be used.
232-
///
233-
/// **IMPORTANT:** this method should only be called for the initial
234-
/// authentication. Calls to this method when restoring a previously
235-
/// created session may end up with conflicting data.
236224
pub fn server_name(self: Arc<Self>, server_name: String) -> Arc<Self> {
237225
let mut builder = unwrap_or_clone_arc(self);
238226
builder.homeserver_cfg = Some(HomeserverConfig::ServerName(server_name));
239227
Arc::new(builder)
240228
}
241229

242-
/// Set the homeserver URL to use.
243-
///
244-
/// The following methods are mutually exclusive: [`Self::homeserver_url`],
245-
/// [`Self::server_name`],
246-
/// [`Self::server_name_or_homeserver_url`].
247-
/// If you set more than one, then whatever was set last will be used.
248-
///
249-
/// **IMPORTANT:** this method should only be called for the initial
250-
/// authentication. Calls to this method when restoring a previously
251-
/// created session may end up with conflicting data.
252230
pub fn homeserver_url(self: Arc<Self>, url: String) -> Arc<Self> {
253231
let mut builder = unwrap_or_clone_arc(self);
254232
builder.homeserver_cfg = Some(HomeserverConfig::Url(url));
255233
Arc::new(builder)
256234
}
257235

258-
/// Set the server name to discover the homeserver from, falling back to
259-
/// using it as a homeserver URL if discovery fails. When falling back to a
260-
/// homeserver URL, a check is made to ensure that the server exists (unlike
261-
/// [`Self::homeserver_url`], so you can guarantee that the client is ready
262-
/// to use.
263-
///
264-
/// The following methods are mutually exclusive: [`Self::homeserver_url`],
265-
/// [`Self::server_name`],
266-
/// [`Self::server_name_or_homeserver_url`].
267-
/// If you set more than one, then whatever was set last will be used.
268-
///
269-
/// **IMPORTANT:** this method should only be called for the initial
270-
/// authentication. Calls to this method when restoring a previously
271-
/// created session may end up with conflicting data.
272236
pub fn server_name_or_homeserver_url(self: Arc<Self>, server_name_or_url: String) -> Arc<Self> {
273237
let mut builder = unwrap_or_clone_arc(self);
274238
builder.homeserver_cfg = Some(HomeserverConfig::ServerNameOrUrl(server_name_or_url));

crates/matrix-sdk/src/client/builder/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ impl ClientBuilder {
166166
/// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
167167
/// [`Self::server_name_or_homeserver_url`].
168168
/// If you set more than one, then whatever was set last will be used.
169-
///
170-
/// **IMPORTANT:** this method should only be called for the initial
171-
/// authentication. Calls to this method when restoring a previously
172-
/// created session may end up with conflicting data.
173169
pub fn homeserver_url(mut self, url: impl AsRef<str>) -> Self {
174170
self.homeserver_cfg = Some(HomeserverConfig::HomeserverUrl(url.as_ref().to_owned()));
175171
self
@@ -184,10 +180,6 @@ impl ClientBuilder {
184180
/// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
185181
/// [`Self::server_name_or_homeserver_url`].
186182
/// If you set more than one, then whatever was set last will be used.
187-
///
188-
/// **IMPORTANT:** this method should only be called for the initial
189-
/// authentication. Calls to this method when restoring a previously
190-
/// created session may end up with conflicting data.
191183
pub fn server_name(mut self, server_name: &ServerName) -> Self {
192184
self.homeserver_cfg = Some(HomeserverConfig::ServerName {
193185
server: server_name.to_owned(),
@@ -205,10 +197,6 @@ impl ClientBuilder {
205197
/// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
206198
/// [`Self::server_name_or_homeserver_url`].
207199
/// If you set more than one, then whatever was set last will be used.
208-
///
209-
/// **IMPORTANT:** this method should only be called for the initial
210-
/// authentication. Calls to this method when restoring a previously
211-
/// created session may end up with conflicting data.
212200
pub fn insecure_server_name_no_tls(mut self, server_name: &ServerName) -> Self {
213201
self.homeserver_cfg = Some(HomeserverConfig::ServerName {
214202
server: server_name.to_owned(),
@@ -227,10 +215,6 @@ impl ClientBuilder {
227215
/// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
228216
/// [`Self::server_name_or_homeserver_url`].
229217
/// If you set more than one, then whatever was set last will be used.
230-
///
231-
/// **IMPORTANT:** this method should only be called for the initial
232-
/// authentication. Calls to this method when restoring a previously
233-
/// created session may end up with conflicting data.
234218
pub fn server_name_or_homeserver_url(mut self, server_name_or_url: impl AsRef<str>) -> Self {
235219
self.homeserver_cfg = Some(HomeserverConfig::ServerNameOrHomeserverUrl(
236220
server_name_or_url.as_ref().to_owned(),

0 commit comments

Comments
 (0)