-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Hi,
When I try to deserialize data into a Struct, I have the following situation:
- Passing correct data works perfectly.
- Passing wrong values or wrong keys crashes Neovim
I can get around this by never returning an error, instead using something like err_writeln
. With this, passing wrong values/keys will correctly report an error back (no crashing).
Since the Function::from
expects something that can return an error, I'm assuming this is unwanted behavior. This can be seen from the "mechanic" example by passing {manufacturer = "Nikola", miles = 20}
, which returns nothing, and then mistyping the key, as {manufacture = "Nikola", miles = 20}
, which crashes Neovim.
patata3000
Metadata
Metadata
Assignees
Labels
No labels