File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -592,12 +592,12 @@ impl<'de> Deserialize<'de> for TimeStamp {
592592
593593 match Bson :: deserialize ( deserializer) ? {
594594 Bson :: TimeStamp ( ts) => {
595- let ts = ts. to_be ( ) ;
595+ let ts = ts. to_le ( ) ;
596596
597597 Ok ( TimeStamp { t : ( ( ts as u64 ) >> 32 ) as u32 ,
598598 i : ( ts & 0xFFFF_FFFF ) as u32 , } )
599599 }
600- _ => Err ( D :: Error :: custom ( "expecting UtcDateTime " ) ) ,
600+ _ => Err ( D :: Error :: custom ( "expecting TimeStamp " ) ) ,
601601 }
602602 }
603603}
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ fn test_de_timestamp() {
6969 }
7070
7171 let foo: Foo = bson:: from_bson ( Bson :: Document ( doc ! {
72- "ts" : Bson :: TimeStamp ( 0x0A00_0000_0C00_0000 ) ,
72+ "ts" : Bson :: TimeStamp ( 0x0000_000C_0000_000A ) ,
7373 } ) ) . unwrap ( ) ;
7474
7575 assert_eq ! ( foo. ts, TimeStamp { t: 12 , i: 10 } ) ;
You can’t perform that action at this time.
0 commit comments