clean up some clippy warnings
Some checks failed
/ test (push) Failing after 3m41s

This commit is contained in:
Jacob Lifshay 2024-10-07 21:49:18 -07:00
parent f12322aa2a
commit ed1aea41f3
Signed by: programmerjake
SSH key fingerprint: SHA256:B1iRVvUJkvd7upMIiMqn6OyxvD2SgJkAH3ZnUOj6z+c
12 changed files with 45 additions and 29 deletions

View file

@ -58,8 +58,7 @@ impl ParsedBundle {
}
*mutability = FieldMutability::None;
colon_token.get_or_insert(Token![:](ident.span()));
let options = errors.unwrap_or_default(HdlAttr::parse_and_take_attr(attrs));
options
errors.unwrap_or_default(HdlAttr::parse_and_take_attr(attrs))
}
fn parse(item: ItemStruct) -> syn::Result<Self> {
let ItemStruct {

View file

@ -600,7 +600,7 @@ impl ToTokens for ParsedEnum {
static_generics.split_for_impl();
let static_type_body_variants =
Vec::from_iter(variants.iter().map(|ParsedVariant { ident, field, .. }| {
if let Some(_) = field {
if field.is_some() {
quote_spanned! {span=>
#ident: ::fayalite::ty::StaticType::TYPE,
}

View file

@ -1410,7 +1410,7 @@ impl ParseTypes<Path> for ParsedType {
let mut args = None;
let segments = Punctuated::from_iter(segments.pairs_mut().map_pair_value_mut(|segment| {
let PathSegment { ident, arguments } = segment;
if let Some(_) = args {
if args.is_some() {
parser
.errors()
.error(&ident, "associated types/consts are not yet implemented");
@ -1594,7 +1594,7 @@ impl ParseTypes<Path> for ParsedConstGenericType {
let mut args = None;
let segments = Punctuated::from_iter(segments.pairs_mut().map_pair_value_mut(|segment| {
let PathSegment { ident, arguments } = segment;
if let Some(_) = args {
if args.is_some() {
parser
.errors()
.error(&ident, "associated types/consts are not yet implemented");
@ -3554,7 +3554,7 @@ impl SplitForImpl for Generics {
Self::TypeGenerics<'_>,
Self::WhereClause<'_>,
) {
Generics::split_for_impl(&self)
Generics::split_for_impl(self)
}
}