When deserializing a string that defines a RON struct with an optional class name that does not match the name of the Rust struct, ron::from_str returns an error that displays as Error: 1:1: Expected struct. It took me quite a long time to figure out what the issue was. It would be more helpful if the error message was something like Error: 1:1: Expected struct "Name" but got struct "ActualName".
When deserializing a string that defines a RON struct with an optional class name that does not match the name of the Rust struct,
ron::from_strreturns an error that displays asError: 1:1: Expected struct. It took me quite a long time to figure out what the issue was. It would be more helpful if the error message was something likeError: 1:1: Expected struct "Name" but got struct "ActualName".