mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-24 09:16:12 +01:00
Fix doc test
This commit is contained in:
parent
84ac0212e8
commit
1882ff0bc4
1 changed files with 6 additions and 4 deletions
|
@ -17,16 +17,18 @@ impl Bot {
|
||||||
/// ## Examples
|
/// ## Examples
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use teloxide_core::types::File as TgFile;
|
/// use teloxide_core::{
|
||||||
|
/// requests::{Request, Requester},
|
||||||
|
/// types::File as TgFile,
|
||||||
|
/// Bot,
|
||||||
|
/// };
|
||||||
/// use tokio::fs::File;
|
/// use tokio::fs::File;
|
||||||
/// # use teloxide_core::RequestError;
|
|
||||||
/// use teloxide_core::{requests::RequestOld, Bot};
|
|
||||||
///
|
///
|
||||||
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
/// let bot = Bot::new("TOKEN");
|
/// let bot = Bot::new("TOKEN");
|
||||||
/// let mut file = File::create("/home/waffle/Pictures/test.png").await?;
|
|
||||||
///
|
///
|
||||||
/// let TgFile { file_path, .. } = bot.get_file("*file_id*").send().await?;
|
/// let TgFile { file_path, .. } = bot.get_file("*file_id*").send().await?;
|
||||||
|
/// let mut file = File::create("/home/waffle/Pictures/test.png").await?;
|
||||||
/// bot.download_file(&file_path, &mut file).await?;
|
/// bot.download_file(&file_path, &mut file).await?;
|
||||||
/// # Ok(()) }
|
/// # Ok(()) }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
Loading…
Add table
Reference in a new issue