Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Correctly wrap deserializer for deserialize_in_place method
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Jul 28, 2024
1 parent 1320028 commit d63de9e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ where
{
T::deserialize(Readable(deserializer)).map(Readable)
}

fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
where
D: Deserializer<'de>,
{
T::deserialize_in_place(Readable(deserializer), &mut place.0)
}
}
impl<'de, T> Deserialize<'de> for Compact<T>
where
Expand All @@ -133,6 +140,13 @@ where
{
T::deserialize(Compact(deserializer)).map(Compact)
}

fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
where
D: Deserializer<'de>,
{
T::deserialize_in_place(Compact(deserializer), &mut place.0)
}
}

impl<'de, T> DeserializeSeed<'de> for Readable<T>
Expand Down

0 comments on commit d63de9e

Please sign in to comment.