Fix doctest
This commit is contained in:
parent
201ff8c185
commit
b974182c72
@ -30,11 +30,11 @@
|
|||||||
//!
|
//!
|
||||||
//! ```no_run
|
//! ```no_run
|
||||||
//! # use futures_util::stream::{StreamExt as _, TryStreamExt as _};
|
//! # use futures_util::stream::{StreamExt as _, TryStreamExt as _};
|
||||||
//! # use ruma_client::Client;
|
//! # use ruma_client::{api::r0::sync::sync_events::SetPresence, Client};
|
||||||
//! # let homeserver_url = "https://example.com".parse().unwrap();
|
//! # let homeserver_url = "https://example.com".parse().unwrap();
|
||||||
//! # let client = Client::https(homeserver_url, None);
|
//! # let client = Client::https(homeserver_url, None);
|
||||||
//! # async {
|
//! # async {
|
||||||
//! let mut sync_stream = Box::pin(client.sync(None, None, true));
|
//! let mut sync_stream = Box::pin(client.sync(None, None, SetPresence::Online));
|
||||||
//! while let Some(response) = sync_stream.try_next().await? {
|
//! while let Some(response) = sync_stream.try_next().await? {
|
||||||
//! // Do something with the data in the response...
|
//! // Do something with the data in the response...
|
||||||
//! }
|
//! }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user