Skip to content

Commit e5cdfcc

Browse files
committed
Support deserializing map key as &RawValue
1 parent 6a3fb68 commit e5cdfcc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/de.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,10 +2184,18 @@ where
21842184
}
21852185

21862186
#[inline]
2187-
fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
2187+
fn deserialize_newtype_struct<V>(self, name: &'static str, visitor: V) -> Result<V::Value>
21882188
where
21892189
V: de::Visitor<'de>,
21902190
{
2191+
#[cfg(feature = "raw_value")]
2192+
{
2193+
if name == crate::raw::TOKEN {
2194+
return self.de.deserialize_raw_value(visitor);
2195+
}
2196+
}
2197+
2198+
let _ = name;
21912199
visitor.visit_newtype_struct(self)
21922200
}
21932201

0 commit comments

Comments
 (0)