Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Oct 17, 2023
1 parent 0d4e122 commit 7268f39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rust/candid/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ impl<'de> Deserializer<'de> {
where
V: Visitor<'de>,
{
Err(Error::msg("Cannot decode empty type"))
Err(if *self.wire_type == TypeInner::Empty {
Error::msg("Cannot decode empty type")
} else {
Error::subtype("Cannot decode empty type")
})
}
fn deserialize_future<'a, V>(&'a mut self, visitor: V) -> Result<V::Value>
where
Expand Down

0 comments on commit 7268f39

Please sign in to comment.