mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-21 22:15:13 +01:00
Fixed newtype serialization in multipart requests
This commit is contained in:
parent
b42d5b336b
commit
5434639cca
2 changed files with 12 additions and 11 deletions
|
@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
|
||||
- Now Vec<MessageId> in requests serializes into [number] instead of [ {message_id: number} ], `forward_messages`, `copy_messages` and `delete_messages` now work properly
|
||||
- Now `ThreadId` is able to serialize in multipart requests
|
||||
|
||||
## 0.13.0 - 2024-08-16
|
||||
|
||||
|
|
|
@ -374,6 +374,17 @@ impl Serializer for PartSerializer {
|
|||
Ok(JsonPartSerializer { buf: String::new(), state: PartSerializerStructState::Empty })
|
||||
}
|
||||
|
||||
fn serialize_newtype_struct<T: ?Sized>(
|
||||
self,
|
||||
_: &'static str,
|
||||
value: &T,
|
||||
) -> Result<Self::Ok, Self::Error>
|
||||
where
|
||||
T: Serialize,
|
||||
{
|
||||
value.serialize(self)
|
||||
}
|
||||
|
||||
// Unimplemented
|
||||
|
||||
fn serialize_none(self) -> Result<Self::Ok, Self::Error> {
|
||||
|
@ -391,17 +402,6 @@ impl Serializer for PartSerializer {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
fn serialize_newtype_struct<T: ?Sized>(
|
||||
self,
|
||||
_: &'static str,
|
||||
_: &T,
|
||||
) -> Result<Self::Ok, Self::Error>
|
||||
where
|
||||
T: Serialize,
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn serialize_newtype_variant<T: ?Sized>(
|
||||
self,
|
||||
_name: &'static str,
|
||||
|
|
Loading…
Reference in a new issue