File tree 3 files changed +0
-8
lines changed
3 files changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -308,12 +308,6 @@ impl From<u32> for Bson {
308
308
}
309
309
}
310
310
311
- impl From < u64 > for Bson {
312
- fn from ( a : u64 ) -> Bson {
313
- Bson :: Int64 ( a as i64 )
314
- }
315
- }
316
-
317
311
impl From < [ u8 ; 12 ] > for Bson {
318
312
fn from ( a : [ u8 ; 12 ] ) -> Bson {
319
313
Bson :: ObjectId ( oid:: ObjectId :: from_bytes ( a) )
Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ impl TryFrom<serde_json::Value> for Bson {
196
196
Bson :: Int64 ( i)
197
197
}
198
198
} )
199
- . or_else ( || x. as_u64 ( ) . map ( Bson :: from) )
200
199
. or_else ( || x. as_f64 ( ) . map ( Bson :: from) )
201
200
. ok_or_else ( || {
202
201
Error :: invalid_value (
Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ fn from_impls() {
114
114
assert_eq ! ( Bson :: from( -48i32 ) , Bson :: Int32 ( -48 ) ) ;
115
115
assert_eq ! ( Bson :: from( -96i64 ) , Bson :: Int64 ( -96 ) ) ;
116
116
assert_eq ! ( Bson :: from( 152u32 ) , Bson :: Int32 ( 152 ) ) ;
117
- assert_eq ! ( Bson :: from( 4096u64 ) , Bson :: Int64 ( 4096 ) ) ;
118
117
119
118
let oid = ObjectId :: new ( ) ;
120
119
assert_eq ! (
You can’t perform that action at this time.
0 commit comments