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 {
636
636
}
637
637
638
638
[ "$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 ) ,
642
642
Ok ( other) => {
643
643
if let Ok ( d) = other. parse ( ) {
644
644
return Bson :: Double ( d) ;
@@ -692,7 +692,10 @@ impl Bson {
692
692
693
693
if let Ok ( t) = timestamp. get_i64 ( "t" ) {
694
694
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 )
696
699
{
697
700
return Bson :: Timestamp ( Timestamp {
698
701
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 {
185
185
serde_json:: Value :: Number ( x) => x
186
186
. as_i64 ( )
187
187
. 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 {
189
189
Bson :: Int32 ( i as i32 )
190
190
} else {
191
191
Bson :: Int64 ( i)
Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ pub(crate) struct Double {
56
56
impl Double {
57
57
pub ( crate ) fn parse ( self ) -> extjson:: de:: Result < f64 > {
58
58
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 ) ,
62
62
other => {
63
63
let d: f64 = other. parse ( ) . map_err ( |_| {
64
64
extjson:: de:: Error :: invalid_value (
You can’t perform that action at this time.
0 commit comments