From 27c0181035273648ed164f510c68d0b0a5bbed7d Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 2 Dec 2021 16:01:37 +0800 Subject: [PATCH] Fix build. --- src/serde/de.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/serde/de.rs b/src/serde/de.rs index ce602dc2..3ba71e2f 100644 --- a/src/serde/de.rs +++ b/src/serde/de.rs @@ -361,9 +361,13 @@ impl<'de> Deserializer<'de> for &mut DynamicDeserializer<'de> { self, visitor: V, ) -> Result> { - self.value + #[cfg(not(feature = "no_index"))] + return self + .value .downcast_ref::() - .map_or_else(|| self.type_error(), |x| visitor.visit_bytes(x)) + .map_or_else(|| self.type_error(), |x| visitor.visit_bytes(x)); + #[cfg(feature = "no_index")] + return self.type_error(); } fn deserialize_byte_buf>(