style: cleanup types.rs

This commit is contained in:
DarkCat09 2024-11-27 19:04:37 +04:00
parent 515ea87156
commit f4c3a6a569
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

View file

@ -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