Skip to content

Commit 6081497

Browse files
committed
Resolve semicolon_if_nothing_returned pedantic clippy lint
error: consider adding a `;` to the last statement for consistent formatting --> serde_derive/src/internals/ast.rs:161:13 | 161 | seen_untagged = variant.attrs.untagged() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `seen_untagged = variant.attrs.untagged();` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned = note: `-D clippy::semicolon-if-nothing-returned` implied by `-D clippy::pedantic` error: consider adding a `;` to the last statement for consistent formatting --> serde_derive/src/internals/ast.rs:159:17 | 159 | ... cx.error_spanned_by(&variant.ident, "all variants with the #[serde(untagged)] attribute must be placed at the end of the enum") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `cx.error_spanned_by(&variant.ident, "all variants with the #[serde(untagged)] attribute must be placed at the end of the enum");` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
1 parent 48e5753 commit 6081497

File tree

1 file changed

+2
-2
lines changed
  • serde_derive/src/internals

1 file changed

+2
-2
lines changed

serde_derive/src/internals/ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ fn enum_from_ast<'a>(
156156
}
157157
}).inspect(|variant| {
158158
if !variant.attrs.untagged() && seen_untagged {
159-
cx.error_spanned_by(&variant.ident, "all variants with the #[serde(untagged)] attribute must be placed at the end of the enum")
159+
cx.error_spanned_by(&variant.ident, "all variants with the #[serde(untagged)] attribute must be placed at the end of the enum");
160160
}
161-
seen_untagged = variant.attrs.untagged()
161+
seen_untagged = variant.attrs.untagged();
162162
}).collect()
163163
}
164164

0 commit comments

Comments
 (0)