Improved error message for flattening on unsupported types

This commit is contained in:
Armin Ronacher
2018-03-16 23:03:56 +01:00
parent b8602a7e43
commit 49e302d17d
+1 -1
View File
@@ -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>(