
Maksim Kaitmazian
authored
Previously, LuaValue was used for deserializing msgpack data. It is marked with #[serde(untagged)] attribute, meaning that the enum is deserializaed by probing each variant in order unless one succeeds. It turned out, that this can cause unexpected type convertions due to the order of variants. For example, msgpack integer value was deserialized into LuaValue::Double, because this variant comes before LuaValue::Integer and integer values can be represented as floats. This commit resolves this issue by configuring LuaValue to be deserialized as rmpv::Value using #[serde(try_from)] attribute.
Name | Last commit | Last update |
---|