Open urben1680 opened 5 days ago
Match patterns using Enum::Variant { .. } should be linted on if the enum variant is field-less.
Enum::Variant { .. }
Example:
match Some(42) { Some(v) => v, None { .. } /* <- lint this */ => 1 }
[allow(...)]
None { .. } => 1 ^^^^^^
Could be written as:
None => 1
This pattern may still useful in macros so this should still be possible to be ignored with an [allow(...)]
What it does
Match patterns using
Enum::Variant { .. }
should be linted on if the enum variant is field-less.Example:
Advantage
Drawbacks
[allow(...)]
Example
Could be written as: