fix: deserialize LuaValue as rmpv::Value
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.
parent
5fbab9f7
No related branches found
No related tags found
Pipeline #57267 failed
Stage: build-base-image
Stage: test
Stage: pack
Stage: docker
Stage: stress-test
Stage: deploy
Loading
Please register or sign in to comment