Skip to content

Commit

Permalink
Add deserialize any
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Sep 21, 2023
1 parent 2ca719d commit ec5dc62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/serde-firestore-value/src/deserializer.rs
Expand Up @@ -14,6 +14,8 @@ struct Error {
enum ErrorCode {
#[error("{0}")]
Custom(String),
#[error("deserialize_any is not supported")]
DeserializeAnyIsNotSupported,
#[error("i16 out of range")]
I16OutOfRange,
#[error("i32 out of range")]
Expand Down Expand Up @@ -49,11 +51,11 @@ struct FirestoreValueDeserializer<'a> {
impl<'a> serde::Deserializer<'a> for FirestoreValueDeserializer<'a> {
type Error = Error;

fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
fn deserialize_any<V>(self, _: V) -> Result<V::Value, Self::Error>
where
V: serde::de::Visitor<'a>,
{
todo!()
Err(Error::from(ErrorCode::DeserializeAnyIsNotSupported))
}

fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>
Expand Down

0 comments on commit ec5dc62

Please sign in to comment.