File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,7 @@ mod tests {
304304 sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
305305 } ) ;
306306
307- if let SubscriptionId :: String ( _) = id {
308- assert ! ( true )
309- } else {
310- assert ! ( false , "Expected SubscriptionId::String" ) ;
311- }
307+ assert ! ( matches!( id, SubscriptionId :: String ( _) ) )
312308 }
313309
314310 #[ test]
@@ -325,11 +321,7 @@ mod tests {
325321 sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
326322 } ) ;
327323
328- if let SubscriptionId :: Number ( _) = id {
329- assert ! ( true )
330- } else {
331- assert ! ( false , "Expected SubscriptionId::Number" ) ;
332- }
324+ assert ! ( matches!( id, SubscriptionId :: Number ( _) ) )
333325 }
334326
335327 #[ test]
@@ -346,11 +338,7 @@ mod tests {
346338 sink. sink_map_err ( |_| ( ) ) . send_all ( stream) . map ( |_| ( ) )
347339 } ) ;
348340
349- if let SubscriptionId :: String ( _) = id {
350- assert ! ( true )
351- } else {
352- assert ! ( false , "Expected SubscriptionId::String" ) ;
353- }
341+ assert ! ( matches!( id, SubscriptionId :: String ( _) ) )
354342 }
355343
356344 #[ test]
You can’t perform that action at this time.
0 commit comments