The UMessageBuilder comm_status member-type is UCode - and so the only thing that this method signature does is, it forces users to put in UCode::OK.value() (requiring the non-obvious extra import of protobuf::Enum), just so that with_comm_status() then directly translates the i32 back into a UCode.
So I propose to change this sig to just use comm_status: UCode. This is not going to take away any flexibility from us, as we are (these days) owning and maintaining our own definition of UCode (not using the outside Google ones any more)
Any objections @sophokles73 @evshary @PLeVasseur @stevenhartley ?
Currently, UMessageBuilder.with_comm_status() is defined as follows:
The UMessageBuilder comm_status member-type is UCode - and so the only thing that this method signature does is, it forces users to put in
UCode::OK.value()
(requiring the non-obvious extra import ofprotobuf::Enum
), just so that with_comm_status() then directly translates the i32 back into a UCode.So I propose to change this sig to just use
comm_status: UCode
. This is not going to take away any flexibility from us, as we are (these days) owning and maintaining our own definition of UCode (not using the outside Google ones any more)Any objections @sophokles73 @evshary @PLeVasseur @stevenhartley ?