Fix doctest

This commit is contained in:
Jonas Platte 2020-04-06 19:48:26 +02:00
parent 201ff8c185
commit b974182c72
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -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...
//! }