From e507dcfcb4e13b883c6266bbd03b30ecbbb0cb07 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 18 Dec 2021 18:44:08 +0800 Subject: [PATCH] Fix no_index build. --- src/types/dynamic.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/dynamic.rs b/src/types/dynamic.rs index 2fb3f573..26251386 100644 --- a/src/types/dynamic.rs +++ b/src/types/dynamic.rs @@ -2074,6 +2074,7 @@ impl Dynamic { } /// Convert the [`Dynamic`] into a [`Vec`]. /// Returns the name of the actual type if any cast fails. + #[cfg(not(feature = "no_index"))] #[inline(always)] pub fn into_typed_array(self) -> Result, &'static str> { match self.0 { @@ -2121,6 +2122,9 @@ impl Dynamic { }) .collect() } + Union::Blob(_, _, _) if TypeId::of::() == TypeId::of::() => { + Ok((*value).clone().cast::>()) + } _ => Err((*value).type_name()), } }