mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 03:43:22 +01:00
fix doc tests
This commit is contained in:
parent
50d3d67f93
commit
cf3cd63c92
1 changed files with 7 additions and 7 deletions
|
@ -42,17 +42,17 @@ pub trait Request: HasPayload {
|
|||
/// ```
|
||||
/// # async {
|
||||
/// use teloxide_core::{
|
||||
/// bot::Bot,
|
||||
/// methods::GetMe,
|
||||
/// requests::{Request, RequestJson},
|
||||
/// payloads::GetMe,
|
||||
/// requests::{JsonRequest, Request},
|
||||
/// types::User,
|
||||
/// Bot,
|
||||
/// };
|
||||
///
|
||||
/// let bot = Bot::new("TOKEN");
|
||||
/// let method = GetMe::new();
|
||||
/// let request = JsonRequest::new(bot, method);
|
||||
/// let _: User = request.send().await.unwrap();
|
||||
/// # }
|
||||
/// # };
|
||||
/// ```
|
||||
fn send(self) -> Self::Send;
|
||||
|
||||
|
@ -69,17 +69,17 @@ pub trait Request: HasPayload {
|
|||
/// ## Examples
|
||||
/// ```
|
||||
/// # async {
|
||||
/// use teloxide_core::prelude::*;
|
||||
/// use teloxide_core::{prelude::*, requests::Request, Bot};
|
||||
///
|
||||
/// 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!");
|
||||
/// for chat_id in chat_ids {
|
||||
/// req.chat_id = chat_id;
|
||||
/// req.send_ref().await.unwrap();
|
||||
/// }
|
||||
/// # }
|
||||
/// # };
|
||||
/// ```
|
||||
fn send_ref(&self) -> Self::SendRef;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue