diff options
Diffstat (limited to 'tvix/serde/src/de.rs')
-rw-r--r-- | tvix/serde/src/de.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tvix/serde/src/de.rs b/tvix/serde/src/de.rs index 0999e8a60368..2f7b2ba4d66d 100644 --- a/tvix/serde/src/de.rs +++ b/tvix/serde/src/de.rs @@ -225,14 +225,14 @@ impl<'de> de::Deserializer<'de> for NixDeserializer { where V: de::Visitor<'de>, { - todo!("how to represent this?"); + unimplemented!() } fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { - todo!("how to represent this?"); + unimplemented!() } // Note that this can not distinguish between a serialisation of @@ -261,24 +261,24 @@ impl<'de> de::Deserializer<'de> for NixDeserializer { fn deserialize_unit_struct<V>( self, - name: &'static str, + _name: &'static str, visitor: V, ) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { - todo!("how to represent this?"); + self.deserialize_unit(visitor) } fn deserialize_newtype_struct<V>( self, - name: &'static str, + _name: &'static str, visitor: V, ) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { - todo!("how to represent this?"); + visitor.visit_newtype_struct(self) } fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> @@ -296,23 +296,25 @@ impl<'de> de::Deserializer<'de> for NixDeserializer { Err(unexpected("list", &self.value)) } - fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value, Self::Error> + fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { - todo!() + // just represent tuples as lists ... + self.deserialize_seq(visitor) } fn deserialize_tuple_struct<V>( self, - name: &'static str, + _name: &'static str, len: usize, visitor: V, ) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { - todo!() + // same as above + self.deserialize_seq(visitor) } fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> |