File tree Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -299,34 +299,22 @@ pub enum ConflictReason {
299299
300300impl ConflictReason {
301301 pub fn is_links ( & self ) -> bool {
302- if let ConflictReason :: Links ( _) = * self {
303- return true ;
304- }
305- false
302+ matches ! ( self , ConflictReason :: Links ( _) )
306303 }
307304
308305 pub fn is_missing_features ( & self ) -> bool {
309- if let ConflictReason :: MissingFeatures ( _) = * self {
310- return true ;
311- }
312- false
306+ matches ! ( self , ConflictReason :: MissingFeatures ( _) )
313307 }
314308
315309 pub fn is_required_dependency_as_features ( & self ) -> bool {
316- if let ConflictReason :: RequiredDependencyAsFeature ( _) = * self {
317- return true ;
318- }
319- false
310+ matches ! ( self , ConflictReason :: RequiredDependencyAsFeature ( _) )
320311 }
321312
322313 pub fn is_public_dependency ( & self ) -> bool {
323- if let ConflictReason :: PublicDependency ( _) = * self {
324- return true ;
325- }
326- if let ConflictReason :: PubliclyExports ( _) = * self {
327- return true ;
328- }
329- false
314+ matches ! (
315+ self ,
316+ ConflictReason :: PublicDependency ( _) | ConflictReason :: PubliclyExports ( _)
317+ )
330318 }
331319}
332320
You can’t perform that action at this time.
0 commit comments