Currently if you have an enum field marked as optional, prost wraps the i32 field in an Option as with other scalar values. However, the generated getter in this case still returns MyEnum instead of Option<MyEnum>, silently converting a None into the default value. This burned me recently, and it's also inconsistent with the fact that the i32 fields are wrapped in Option.
Currently if you have an enum field marked as
optional,prostwraps thei32field in anOptionas with other scalar values. However, the generated getter in this case still returnsMyEnuminstead ofOption<MyEnum>, silently converting aNoneinto the default value. This burned me recently, and it's also inconsistent with the fact that thei32fields are wrapped inOption.