Cargo fmt

This commit is contained in:
LasterAlex 2024-08-30 09:15:28 +03:00
parent a52fe8eeb5
commit 83f5508495
No known key found for this signature in database
2 changed files with 3 additions and 5 deletions

View file

@ -223,10 +223,8 @@ fn params(params: impl Iterator<Item = impl Borrow<Param>>) -> String {
{ {
"\n #[serde(flatten)]" "\n #[serde(flatten)]"
} }
Type::ArrayOf(b) if **b == Type::RawTy("MessageId".to_string()) => Type::ArrayOf(b) if **b == Type::RawTy("MessageId".to_string()) => {
{ "\n #[serde(with = \"crate::types::vec_msg_id_as_vec_int\")]"
"\n #[serde(with = \
\"crate::types::vec_msg_id_as_vec_int\")]"
} }
_ => "", _ => "",
}; };

View file

@ -572,7 +572,7 @@ pub(crate) mod vec_msg_id_as_vec_int {
} }
{ {
let s = Struct {msg_ids: vec![MessageId(1), MessageId(2)]}; let s = Struct { msg_ids: vec![MessageId(1), MessageId(2)] };
let json = serde_json::to_string(&s).unwrap(); let json = serde_json::to_string(&s).unwrap();
assert_eq!(json, "{\"msg_ids\":[1,2]}"); assert_eq!(json, "{\"msg_ids\":[1,2]}");
} }