Skip to content

Commit 49e302d

Browse files
committed
Improved error message for flattening on unsupported types
1 parent b8602a7 commit 49e302d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serde/src/private/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,7 @@ impl<'a, 'de, E> Deserializer<'de> for FlatMapDeserializer<'a, 'de, E>
20872087
where
20882088
V: Visitor<'de>,
20892089
{
2090-
Err(Error::custom("can only flatten structs, maps and basic enums"))
2090+
Err(Error::custom("can only flatten structs, maps and struct enum variants"))
20912091
}
20922092

20932093
fn deserialize_enum<V>(

0 commit comments

Comments
 (0)