Skip to content

Commit 8a65644

Browse files
committed
zeroize_derive v1.4.3
1 parent 83c7093 commit 8a65644

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zeroize/derive/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 1.4.3 (2025-12-29)
8+
### Fixed
9+
- Rust 1.92 warnings ([#1270])
10+
11+
[#1270]: https://github.com/RustCrypto/utils/pull/1270
12+
713
## 1.4.2 (2023-03-30)
814
### Changed
915
- Inject where clauses; skip unused ([#882])

zeroize/derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "zeroize_derive"
33
description = "Custom derive support for zeroize"
4-
version = "1.4.2"
4+
version = "1.4.3"
55
authors = ["The RustCrypto Project Developers"]
66
license = "Apache-2.0 OR MIT"
77
repository = "https://github.com/RustCrypto/utils/tree/master/zeroize/derive"
@@ -17,7 +17,7 @@ proc-macro = true
1717
[dependencies]
1818
proc-macro2 = "1"
1919
quote = "1"
20-
syn = {version = "2", features = ["full", "extra-traits", "visit"]}
20+
syn = { version = "2", features = ["full", "extra-traits", "visit"] }
2121

2222
[package.metadata.docs.rs]
2323
rustdoc-args = ["--document-private-items"]

zeroize/derive/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
use proc_macro2::{Ident, TokenStream};
88
use quote::{format_ident, quote};
99
use syn::{
10+
Attribute, Data, DeriveInput, Expr, ExprLit, Field, Fields, Lit, Meta, Result, Variant,
11+
WherePredicate,
1012
parse::{Parse, ParseStream},
1113
parse_quote,
1214
punctuated::Punctuated,
1315
token::Comma,
1416
visit::Visit,
15-
Attribute, Data, DeriveInput, Expr, ExprLit, Field, Fields, Lit, Meta, Result, Variant,
16-
WherePredicate,
1717
};
1818

1919
/// Name of zeroize-related attributes
@@ -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)