Skip to content

Commit e81ffef

Browse files
committed
minor: fix clippy
1 parent a5a8427 commit e81ffef

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/tests/modules/bson.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ fn from_impls() {
110110
assert_eq!(Bson::from(-48i32), Bson::Int32(-48));
111111
assert_eq!(Bson::from(-96i64), Bson::Int64(-96));
112112
assert_eq!(Bson::from(152u32), Bson::Int32(152));
113-
assert_eq!(Bson::from(i32::MAX as u32 + 1), Bson::Int64(i32::MAX as i64 + 1));
113+
assert_eq!(
114+
Bson::from(i32::MAX as u32 + 1),
115+
Bson::Int64(i32::MAX as i64 + 1)
116+
);
114117
assert_eq!(Bson::from(4096u64), Bson::Int64(4096));
115118

116119
let oid = ObjectId::new();

src/tests/modules/ordered.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ fn test_getters() {
105105

106106
doc.insert("null".to_string(), Bson::Null);
107107
assert_eq!(Some(&Bson::Null), doc.get("null"));
108-
assert_eq!(true, doc.is_null("null"));
109-
assert_eq!(false, doc.is_null("array"));
108+
assert!(doc.is_null("null"));
109+
assert!(!doc.is_null("array"));
110110

111111
assert_eq!(Some(&Bson::Int32(1)), doc.get("i32"));
112112
assert_eq!(Ok(1i32), doc.get_i32("i32"));

src/tests/modules/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn boolean() {
5050
let _guard = LOCK.run_concurrently();
5151
let obj = Bson::Boolean(true);
5252
let b: bool = from_bson(obj.clone()).unwrap();
53-
assert_eq!(b, true);
53+
assert!(b);
5454

5555
let deser: Bson = to_bson(&b).unwrap();
5656
assert_eq!(deser, obj);

0 commit comments

Comments
 (0)