-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Description
What do you think about encoding u32
as i64
?
I currently have the issue that I basically generate my Rust code from protobuf definitions, which I then want to decode and encode using bson. Now changing all protobuf defintions to i32
just because bson does not support unsigned ints does not seem really reasonable to me. I know this does not cover the u64
, downside I guess is here the inconsistency.
fn serialize_u32(self, value: u32) -> EncoderResult<Bson> {
Ok(Bson::I64(value as i64))
}
Metadata
Metadata
Assignees
Labels
No labels