From 1e96c3a1dcc808c0cad76b1f3098b54342f2f05d Mon Sep 17 00:00:00 2001 From: Saghm Rossi Date: Sun, 30 Jul 2017 22:11:47 -0400 Subject: [PATCH] remove floating points for literals in patterns --- tests/client/wire_protocol.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/client/wire_protocol.rs b/tests/client/wire_protocol.rs index ce0fc680..d989e472 100644 --- a/tests/client/wire_protocol.rs +++ b/tests/client/wire_protocol.rs @@ -58,7 +58,7 @@ fn insert_single_key_doc() { assert_eq!(docs.len() as i32, 1); match docs[0].get("foo") { - Some(&Bson::FloatingPoint(42.0)) => (), + Some(&Bson::FloatingPoint(f)) if f == 42.0 => (), _ => panic!("Wrong value returned!"), }; } @@ -122,7 +122,7 @@ fn insert_multi_key_doc() { assert_eq!(docs.len() as i32, 1); match docs[0].get("foo") { - Some(&Bson::FloatingPoint(42.0)) => (), + Some(&Bson::FloatingPoint(f)) if f == 42.0 => (), _ => panic!("Wrong value returned!"), }; @@ -196,7 +196,7 @@ fn insert_docs() { assert_eq!(docs.len() as i32, 2); match docs[0].get("foo") { - Some(&Bson::FloatingPoint(42.0)) => (), + Some(&Bson::FloatingPoint(f)) if f == 42.0 => (), _ => panic!("Wrong value returned!"), };