Skip to content

Commit ba99c6d

Browse files
committed
zeroize_derive: fixup rust 1.92 warnings
This is a backport of: - RustCrypto#1072 - RustCrypto#1270
1 parent 83c7093 commit ba99c6d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎zeroize/derive/src/lib.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl ZeroizeAttrs {
176176
}
177177

178178
match &input.data {
179-
syn::Data::Enum(enum_) => {
179+
Data::Enum(enum_) => {
180180
for variant in &enum_.variants {
181181
for attr in &variant.attrs {
182182
result.parse_attr(attr, Some(variant), None);
@@ -191,7 +191,7 @@ impl ZeroizeAttrs {
191191
}
192192
}
193193
}
194-
syn::Data::Struct(struct_) => {
194+
Data::Struct(struct_) => {
195195
for field in &struct_.fields {
196196
for attr in &field.attrs {
197197
result.parse_attr(attr, None, Some(field));
@@ -201,7 +201,7 @@ impl ZeroizeAttrs {
201201
}
202202
}
203203
}
204-
syn::Data::Union(union_) => panic!("Unsupported untagged union {:?}", union_),
204+
Data::Union(union_) => panic!("Unsupported untagged union {:?}", union_),
205205
}
206206

207207
result.auto_params = bound_accumulator.params;
@@ -374,7 +374,7 @@ fn generate_fields(input: &DeriveInput, method: TokenStream) -> TokenStream {
374374
};
375375

376376
quote! {
377-
#[allow(unused_variables)]
377+
#[allow(unused_variables, unused_assignments)]
378378
#binding => {
379379
#(#method_field);*
380380
}

0 commit comments

Comments
 (0)