File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -636,9 +636,9 @@ impl Bson {
636636 }
637637
638638 [ "$numberDouble" ] => match doc. get_str ( "$numberDouble" ) {
639- Ok ( "Infinity" ) => return Bson :: Double ( f64:: INFINITY ) ,
640- Ok ( "-Infinity" ) => return Bson :: Double ( f64:: NEG_INFINITY ) ,
641- Ok ( "NaN" ) => return Bson :: Double ( f64:: NAN ) ,
639+ Ok ( "Infinity" ) => return Bson :: Double ( std :: f64:: INFINITY ) ,
640+ Ok ( "-Infinity" ) => return Bson :: Double ( std :: f64:: NEG_INFINITY ) ,
641+ Ok ( "NaN" ) => return Bson :: Double ( std :: f64:: NAN ) ,
642642 Ok ( other) => {
643643 if let Ok ( d) = other. parse ( ) {
644644 return Bson :: Double ( d) ;
@@ -692,7 +692,10 @@ impl Bson {
692692
693693 if let Ok ( t) = timestamp. get_i64 ( "t" ) {
694694 if let Ok ( i) = timestamp. get_i64 ( "i" ) {
695- if t >= 0 && i >= 0 && t <= ( u32:: MAX as i64 ) && i <= ( u32:: MAX as i64 )
695+ if t >= 0
696+ && i >= 0
697+ && t <= ( std:: u32:: MAX as i64 )
698+ && i <= ( std:: u32:: MAX as i64 )
696699 {
697700 return Bson :: Timestamp ( Timestamp {
698701 time : t as u32 ,
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ impl TryFrom<serde_json::Value> for Bson {
185185 serde_json:: Value :: Number ( x) => x
186186 . as_i64 ( )
187187 . map ( |i| {
188- if i >= i32:: MIN as i64 && i <= i32:: MAX as i64 {
188+ if i >= std :: i32:: MIN as i64 && i <= std :: i32:: MAX as i64 {
189189 Bson :: Int32 ( i as i32 )
190190 } else {
191191 Bson :: Int64 ( i)
Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ pub(crate) struct Double {
5656impl Double {
5757 pub ( crate ) fn parse ( self ) -> extjson:: de:: Result < f64 > {
5858 match self . value . as_str ( ) {
59- "Infinity" => Ok ( f64:: INFINITY ) ,
60- "-Infinity" => Ok ( f64:: NEG_INFINITY ) ,
61- "NaN" => Ok ( f64:: NAN ) ,
59+ "Infinity" => Ok ( std :: f64:: INFINITY ) ,
60+ "-Infinity" => Ok ( std :: f64:: NEG_INFINITY ) ,
61+ "NaN" => Ok ( std :: f64:: NAN ) ,
6262 other => {
6363 let d: f64 = other. parse ( ) . map_err ( |_| {
6464 extjson:: de:: Error :: invalid_value (
You can’t perform that action at this time.
0 commit comments