Commit ef92a48 1 parent e2569b9 commit ef92a48 Copy full SHA for ef92a48
File tree 1 file changed +3
-15
lines changed
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,7 @@ mod tests {
304
304
sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
305
305
} ) ;
306
306
307
- if let SubscriptionId :: String ( _) = id {
308
- assert ! ( true )
309
- } else {
310
- assert ! ( false , "Expected SubscriptionId::String" ) ;
311
- }
307
+ assert ! ( matches!( id, SubscriptionId :: String ( _) ) )
312
308
}
313
309
314
310
#[ test]
@@ -325,11 +321,7 @@ mod tests {
325
321
sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
326
322
} ) ;
327
323
328
- if let SubscriptionId :: Number ( _) = id {
329
- assert ! ( true )
330
- } else {
331
- assert ! ( false , "Expected SubscriptionId::Number" ) ;
332
- }
324
+ assert ! ( matches!( id, SubscriptionId :: Number ( _) ) )
333
325
}
334
326
335
327
#[ test]
@@ -346,11 +338,7 @@ mod tests {
346
338
sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
347
339
} ) ;
348
340
349
- if let SubscriptionId :: String ( _) = id {
350
- assert ! ( true )
351
- } else {
352
- assert ! ( false , "Expected SubscriptionId::String" ) ;
353
- }
341
+ assert ! ( matches!( id, SubscriptionId :: String ( _) ) )
354
342
}
355
343
356
344
#[ test]
You can’t perform that action at this time.
0 commit comments