Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Commit 4a432f0

Browse files
authored
remove floating points for literals in patterns (#231)
1 parent a83f2c1 commit 4a432f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/client/wire_protocol.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn insert_single_key_doc() {
5858
assert_eq!(docs.len() as i32, 1);
5959

6060
match docs[0].get("foo") {
61-
Some(&Bson::FloatingPoint(42.0)) => (),
61+
Some(&Bson::FloatingPoint(f)) if f == 42.0 => (),
6262
_ => panic!("Wrong value returned!"),
6363
};
6464
}
@@ -122,7 +122,7 @@ fn insert_multi_key_doc() {
122122
assert_eq!(docs.len() as i32, 1);
123123

124124
match docs[0].get("foo") {
125-
Some(&Bson::FloatingPoint(42.0)) => (),
125+
Some(&Bson::FloatingPoint(f)) if f == 42.0 => (),
126126
_ => panic!("Wrong value returned!"),
127127
};
128128

@@ -196,7 +196,7 @@ fn insert_docs() {
196196
assert_eq!(docs.len() as i32, 2);
197197

198198
match docs[0].get("foo") {
199-
Some(&Bson::FloatingPoint(42.0)) => (),
199+
Some(&Bson::FloatingPoint(f)) if f == 42.0 => (),
200200
_ => panic!("Wrong value returned!"),
201201
};
202202

0 commit comments

Comments
 (0)