Skip to content

Commit 9b7c3a1

Browse files
minor: fix formatting (#276)
1 parent 32d67de commit 9b7c3a1

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

src/concern/test.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ async fn inconsistent_write_concern_rejected() {
107107
)
108108
.await
109109
.expect_err("insert should fail");
110-
assert!(matches!(error.kind.as_ref(), ErrorKind::ArgumentError { .. }));
110+
assert!(matches!(
111+
error.kind.as_ref(),
112+
ErrorKind::ArgumentError { .. }
113+
));
111114

112115
let coll = db.collection(function_name!());
113116
let wc = WriteConcern {
@@ -120,7 +123,10 @@ async fn inconsistent_write_concern_rejected() {
120123
.insert_one(doc! {}, options)
121124
.await
122125
.expect_err("insert should fail");
123-
assert!(matches!(error.kind.as_ref(), ErrorKind::ArgumentError { .. }));
126+
assert!(matches!(
127+
error.kind.as_ref(),
128+
ErrorKind::ArgumentError { .. }
129+
));
124130
}
125131

126132
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
@@ -142,5 +148,8 @@ async fn unacknowledged_write_concern_rejected() {
142148
)
143149
.await
144150
.expect_err("insert should fail");
145-
assert!(matches!(error.kind.as_ref(), ErrorKind::ArgumentError { .. }));
151+
assert!(matches!(
152+
error.kind.as_ref(),
153+
ErrorKind::ArgumentError { .. }
154+
));
146155
}

src/test/coll.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,16 @@ async fn find_one_and_delete_hint_server_version() {
721721
let req2 = VersionReq::parse("4.2.*").unwrap();
722722
if req1.matches(&client.server_version.as_ref().unwrap()) {
723723
let error = res.expect_err("find one and delete should fail");
724-
assert!(matches!(error.kind.as_ref(), ErrorKind::OperationError { .. }));
724+
assert!(matches!(
725+
error.kind.as_ref(),
726+
ErrorKind::OperationError { .. }
727+
));
725728
} else if req2.matches(&client.server_version.as_ref().unwrap()) {
726729
let error = res.expect_err("find one and delete should fail");
727-
assert!(matches!(error.kind.as_ref(), ErrorKind::CommandError { .. }));
730+
assert!(matches!(
731+
error.kind.as_ref(),
732+
ErrorKind::CommandError { .. }
733+
));
728734
} else {
729735
assert!(res.is_ok());
730736
}

0 commit comments

Comments
 (0)