fix doc tests

This commit is contained in:
Waffle 2020-12-28 21:03:33 +03:00
parent 50d3d67f93
commit cf3cd63c92

View file

@ -42,17 +42,17 @@ pub trait Request: HasPayload {
/// ``` /// ```
/// # async { /// # async {
/// use teloxide_core::{ /// use teloxide_core::{
/// bot::Bot, /// payloads::GetMe,
/// methods::GetMe, /// requests::{JsonRequest, Request},
/// requests::{Request, RequestJson},
/// types::User, /// types::User,
/// Bot,
/// }; /// };
/// ///
/// let bot = Bot::new("TOKEN"); /// let bot = Bot::new("TOKEN");
/// let method = GetMe::new(); /// let method = GetMe::new();
/// let request = JsonRequest::new(bot, method); /// let request = JsonRequest::new(bot, method);
/// let _: User = request.send().await.unwrap(); /// let _: User = request.send().await.unwrap();
/// # } /// # };
/// ``` /// ```
fn send(self) -> Self::Send; fn send(self) -> Self::Send;
@ -69,17 +69,17 @@ pub trait Request: HasPayload {
/// ## Examples /// ## Examples
/// ``` /// ```
/// # async { /// # async {
/// use teloxide_core::prelude::*; /// use teloxide_core::{prelude::*, requests::Request, Bot};
/// ///
/// let bot = Bot::new("TOKEN"); /// let bot = Bot::new("TOKEN");
/// # let chat_ids = vec![1, 2, 3, 4].into_iter().map(Into::into); /// # let chat_ids = vec![1i64, 2, 3, 4].into_iter().map(Into::into);
/// ///
/// let mut req = bot.send_message(0, "Hi there!"); /// let mut req = bot.send_message(0, "Hi there!");
/// for chat_id in chat_ids { /// for chat_id in chat_ids {
/// req.chat_id = chat_id; /// req.chat_id = chat_id;
/// req.send_ref().await.unwrap(); /// req.send_ref().await.unwrap();
/// } /// }
/// # } /// # };
/// ``` /// ```
fn send_ref(&self) -> Self::SendRef; fn send_ref(&self) -> Self::SendRef;
} }