mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 21:21:02 +00:00
Improved error message for flattening on unsupported types
This commit is contained in:
@@ -2087,7 +2087,7 @@ impl<'a, 'de, E> Deserializer<'de> for FlatMapDeserializer<'a, 'de, E>
|
|||||||
where
|
where
|
||||||
V: Visitor<'de>,
|
V: Visitor<'de>,
|
||||||
{
|
{
|
||||||
Err(Error::custom("can only flatten structs, maps and basic enums"))
|
Err(Error::custom("can only flatten structs, maps and struct enum variants"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_enum<V>(
|
fn deserialize_enum<V>(
|
||||||
|
|||||||
Reference in New Issue
Block a user