stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.37k stars 124 forks source link

value 0 is indistinguishable from None and not encoded ... #125

Closed przygienda closed 6 years ago

przygienda commented 6 years ago

Completely ruins my day right now.

set_value(0)

will NOT encode it for a u32 field. clear_value sets the value to 0 and ignores it.

Boy, Rust can do much better than that, hence Option<> is your friend.

Cannot drive an internal API right now due to this problem. Sigh ...

przygienda commented 6 years ago

closing, protobuf issue