mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
Small fixes: fmt & import in test
This commit is contained in:
parent
445c42b585
commit
290258cd1f
2 changed files with 6 additions and 4 deletions
|
@ -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,
|
||||||
/// };
|
/// };
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue