You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[test]
fn test_byte_array() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Foo {
a: Vec<u8>,
}
let foo = Foo { a: vec![100u8; 400]};
let e = Encoder::new();
let r = match foo.serialize(e) {
Ok(b) => b,
Err(e) => panic!("Failed to serialize: {}", e),
};
println!("result {:?}", r);
}
Result in the error: thread 'test_byte_array' panicked at 'Failed to serialize: BSON does not support unsigned type', test.rs:88:19
I would expect a Bson::Binary element to be created.
The text was updated successfully, but these errors were encountered:
Why convert a
Vec<u8>
not in aBson::Binary
?Result in the error:
thread 'test_byte_array' panicked at 'Failed to serialize: BSON does not support unsigned type', test.rs:88:19
I would expect a
Bson::Binary
element to be created.The text was updated successfully, but these errors were encountered: