Closed yeoupooh closed 2 months ago
If there is an enum type in protobuf message, there is a deprecated issue in converting i32 to the enum in generated rust code like below.
message.proto
enum MyEnum { A = 0; B = 1; }
rust code
let my_enum: MyEnum = MyEnum::from_i32(i32_enum).unwrap();
compiler warning log:
warning: use of deprecated associated function `messages::my_app::MyEnum::from_i32`: Use the TryFrom<i32> implementation instead
This could be fixed by upgrading the prost package to v0.12.6 which is the latest one. See the related fix on the prost.
prost
N/A
Great, there will be a new version soon with this fix applied :) Thanks for the report!
Report
If there is an enum type in protobuf message, there is a deprecated issue in converting i32 to the enum in generated rust code like below.
message.proto
rust code
compiler warning log:
This could be fixed by upgrading the
prost
package to v0.12.6 which is the latest one. See the related fix on the prost.Steps to Reproduce
N/A
System Information
N/A