Small fixes: fmt & import in test

This commit is contained in:
Waffle 2020-12-12 17:59:45 +03:00
parent 445c42b585
commit 290258cd1f
2 changed files with 6 additions and 4 deletions

View file

@ -34,7 +34,8 @@ pub trait Download<'w>
/// ///
/// ```no_run /// ```no_run
/// use teloxide_core::{ /// use teloxide_core::{
/// requests::{Download, Request, Requester}, /// net::Download,
/// requests::{Request, Requester},
/// types::File as TgFile, /// types::File as TgFile,
/// Bot, /// Bot,
/// }; /// };

View file

@ -62,9 +62,10 @@ mod tests {
let s = r#"{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}"#; let s = r#"{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}"#;
let val = serde_json::from_str::<TelegramResponse<Update>>(s).unwrap(); let val = serde_json::from_str::<TelegramResponse<Update>>(s).unwrap();
assert!( assert!(matches!(
matches!(val, TelegramResponse::Err { error: ApiError::TerminatedByOtherGetUpdates, .. }) val,
); TelegramResponse::Err { error: ApiError::TerminatedByOtherGetUpdates, .. }
));
} }
#[test] #[test]