Skip to content

Commit fa9129f

Browse files
committed
Resolve unnested_or_patterns pedantic clippy lint in test
warning: unnested or-patterns --> tests/common/eq.rs:895:25 | 895 | / AttrItemKind::Parsed(_) 896 | | | AttrItemKind::Unparsed(AttrArgs::Empty) 897 | | | AttrItemKind::Unparsed(AttrArgs::Delimited(_)) => false, | |________________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnested_or_patterns)]` help: nest the patterns | 895 ~ AttrItemKind::Parsed(_) | 896 ~ AttrItemKind::Unparsed(AttrArgs::Empty | AttrArgs::Delimited(_)) => false, |
1 parent 9109265 commit fa9129f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/common/eq.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,7 @@ impl SpanlessEq for AttrKind {
893893
SpanlessEq::eq(&path, &normal2.item.path)
894894
&& match &normal2.item.args {
895895
AttrItemKind::Parsed(_)
896-
| AttrItemKind::Unparsed(AttrArgs::Empty)
897-
| AttrItemKind::Unparsed(AttrArgs::Delimited(_)) => false,
896+
| AttrItemKind::Unparsed(AttrArgs::Empty | AttrArgs::Delimited(_)) => false,
898897
AttrItemKind::Unparsed(AttrArgs::Eq { eq_span: _, expr }) => {
899898
match &expr.kind {
900899
ExprKind::Lit(lit) => is_escaped_lit(lit, *unescaped),

0 commit comments

Comments
 (0)