style: cleanup types.rs
This commit is contained in:
parent
515ea87156
commit
f4c3a6a569
1 changed files with 2 additions and 5 deletions
|
@ -26,8 +26,7 @@ pub struct SenderCtx {
|
|||
}
|
||||
|
||||
/// Telegram Bot API response:
|
||||
/// these idiots use `{ok:true,response:...}` schema
|
||||
/// for some reason
|
||||
/// `{ok: true, result: (what we actually need)}`
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct TgResponse {
|
||||
pub result: Vec<TgUpdate>,
|
||||
|
@ -53,14 +52,12 @@ pub struct TgMessage {
|
|||
#[derive(Debug, Deserialize)]
|
||||
pub struct TgChat {
|
||||
pub id: i64,
|
||||
// #[serde(default)]
|
||||
// is_forum: bool,
|
||||
}
|
||||
|
||||
/// XKCD API comic info schema
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct XkcdInfo {
|
||||
pub title: String,
|
||||
pub title: String, // same in two APIs
|
||||
#[serde(alias = "image")] // xkcd.ru
|
||||
pub img: String, // xkcd.com
|
||||
#[serde(alias = "text")] // xkcd.ru
|
||||
|
|
Loading…
Add table
Reference in a new issue