File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,10 @@ async fn inconsistent_write_concern_rejected() {
107
107
)
108
108
. await
109
109
. 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
+ ) ) ;
111
114
112
115
let coll = db. collection ( function_name ! ( ) ) ;
113
116
let wc = WriteConcern {
@@ -120,7 +123,10 @@ async fn inconsistent_write_concern_rejected() {
120
123
. insert_one ( doc ! { } , options)
121
124
. await
122
125
. 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
+ ) ) ;
124
130
}
125
131
126
132
#[ cfg_attr( feature = "tokio-runtime" , tokio:: test) ]
@@ -142,5 +148,8 @@ async fn unacknowledged_write_concern_rejected() {
142
148
)
143
149
. await
144
150
. 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
+ ) ) ;
146
155
}
Original file line number Diff line number Diff line change @@ -721,10 +721,16 @@ async fn find_one_and_delete_hint_server_version() {
721
721
let req2 = VersionReq :: parse ( "4.2.*" ) . unwrap ( ) ;
722
722
if req1. matches ( & client. server_version . as_ref ( ) . unwrap ( ) ) {
723
723
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
+ ) ) ;
725
728
} else if req2. matches ( & client. server_version . as_ref ( ) . unwrap ( ) ) {
726
729
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
+ ) ) ;
728
734
} else {
729
735
assert ! ( res. is_ok( ) ) ;
730
736
}
You can’t perform that action at this time.
0 commit comments