We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 137c4c7 commit 467f89eCopy full SHA for 467f89e
src/bson.rs
@@ -320,7 +320,7 @@ impl Bson {
320
match j {
321
&Value::Number(ref x) =>
322
x.as_i64().map(Bson::from)
323
- .or(x.as_f64().map(Bson::from))
+ .or_else(|| x.as_f64().map(Bson::from))
324
.expect(&format!("Invalid number value: {}", x)),
325
&Value::String(ref x) => x.into(),
326
&Value::Bool(x) => x.into(),
0 commit comments