mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
fix doc tests
This commit is contained in:
parent
86cac381e7
commit
2a20fdd1c0
2 changed files with 3 additions and 4 deletions
|
@ -18,7 +18,7 @@
|
||||||
//! };
|
//! };
|
||||||
//!
|
//!
|
||||||
//! let bot = Bot::from_env()
|
//! let bot = Bot::from_env()
|
||||||
//! .parse_mode(ParseMode::MarkdownV2)
|
//! .parse_mode(ParseMode::MarkdownV2);
|
||||||
//!
|
//!
|
||||||
//! let me = bot.get_me().await?;
|
//! let me = bot.get_me().await?;
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -56,12 +56,11 @@ where
|
||||||
/// // Note: it's recommended to `Requester` instead of creating requests directly
|
/// // Note: it's recommended to `Requester` instead of creating requests directly
|
||||||
/// let method = GetMe::new();
|
/// let method = GetMe::new();
|
||||||
/// let request = JsonRequest::new(bot, method);
|
/// let request = JsonRequest::new(bot, method);
|
||||||
|
/// let request_clone = request.clone();
|
||||||
/// let _: Me = request.send().await.unwrap();
|
/// let _: Me = request.send().await.unwrap();
|
||||||
///
|
///
|
||||||
/// // You can also just await requests, without calling `send`:
|
/// // You can also just await requests, without calling `send`:
|
||||||
/// let method = GetMe::new();
|
/// let _: Me = request_clone.await.unwrap();
|
||||||
/// let request = JsonRequest::new(bot, method);
|
|
||||||
/// let _: Me = request.await.unwrap();
|
|
||||||
/// # };
|
/// # };
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use = "Futures are lazy and do nothing unless polled or awaited"]
|
#[must_use = "Futures are lazy and do nothing unless polled or awaited"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue