forked from libre-chip/fayalite
fix clippy lints in generated code
This commit is contained in:
parent
017c14a2f1
commit
99180eb3b4
3 changed files with 13 additions and 3 deletions
|
@ -584,7 +584,7 @@ impl ToTokens for ParsedBundle {
|
|||
|((index, field), flip)| {
|
||||
let ident: &Ident = field.ident().as_ref().unwrap();
|
||||
let ident_str = ident.to_string();
|
||||
let flipped = flip.is_some();
|
||||
let not_flipped = flip.is_none().then(|| Token);
|
||||
quote_spanned! {span=>
|
||||
#ident: {
|
||||
let ::fayalite::bundle::BundleField {
|
||||
|
@ -593,7 +593,7 @@ impl ToTokens for ParsedBundle {
|
|||
ty: __ty,
|
||||
} = #fields_token[#index];
|
||||
::fayalite::__std::assert_eq!(&*__name, #ident_str);
|
||||
::fayalite::__std::assert_eq!(__flipped, #flipped);
|
||||
::fayalite::__std::assert!(#not_flipped __flipped);
|
||||
::fayalite::ty::Type::from_canonical(__ty)
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue