Fix doctest
This commit is contained in:
parent
201ff8c185
commit
b974182c72
@ -30,11 +30,11 @@
|
||||
//!
|
||||
//! ```no_run
|
||||
//! # 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 client = Client::https(homeserver_url, None);
|
||||
//! # 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? {
|
||||
//! // Do something with the data in the response...
|
||||
//! }
|
||||
|
Loading…
x
Reference in New Issue
Block a user