mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
Fix codegen
This commit is contained in:
parent
6f7cdd9702
commit
178e6569a1
1 changed files with 9 additions and 2 deletions
|
@ -56,10 +56,15 @@ fn codegen_payloads() {
|
||||||
.map(|field| format!(" @[multipart = {}]\n", field.join(", ")))
|
.map(|field| format!(" @[multipart = {}]\n", field.join(", ")))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
|
// FIXME: CreateNewStickerSet has to be be only Debug + Clone + Serialize (maybe
|
||||||
|
// better fix?)
|
||||||
let derive = if !multipart.is_empty()
|
let derive = if !multipart.is_empty()
|
||||||
|| matches!(
|
|| matches!(
|
||||||
&*method.names.1,
|
&*method.names.1,
|
||||||
"SendMediaGroup" | "EditMessageMedia" | "EditMessageMediaInline"
|
"SendMediaGroup"
|
||||||
|
| "EditMessageMedia"
|
||||||
|
| "EditMessageMediaInline"
|
||||||
|
| "CreateNewStickerSet"
|
||||||
) {
|
) {
|
||||||
"#[derive(Debug, Clone, Serialize)]".to_owned()
|
"#[derive(Debug, Clone, Serialize)]".to_owned()
|
||||||
} else {
|
} else {
|
||||||
|
@ -188,7 +193,9 @@ fn eq_hash_suitable(method: &Method) -> bool {
|
||||||
|
|
||||||
Type::Url | Type::DateTime => true,
|
Type::Url | Type::DateTime => true,
|
||||||
|
|
||||||
Type::RawTy(raw) => raw != "MaskPosition" && raw != "InlineQueryResult",
|
Type::RawTy(raw) => {
|
||||||
|
raw != "InputSticker" && raw != "MaskPosition" && raw != "InlineQueryResult"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue