pass clippy (#575)

This commit is contained in:
Demonthos authored and GitHub committed 2022-10-02 14:12:24 -07:00
1 parent 047ed1e553
commit daeffd4149
20 files changed
+259 -345

No files matched your search

+3 -5
View File
@@ -242,11 +242,9 @@ impl Parse for ComponentField {
let forked = input.fork();
let t: LitStr = forked.parse()?;
// the string literal must either be the end of the input or a followed by a comma
if forked.is_empty() || forked.peek(Token![,]) {
if is_literal_foramtted(&t) {
let content = ContentField::Formatted(input.parse()?);
return Ok(Self { name, content });
}
if (forked.is_empty() || forked.peek(Token![,])) && is_literal_foramtted(&t) {
let content = ContentField::Formatted(input.parse()?);
return Ok(Self { name, content });
}
}