Replace deprecated `zeroize(drop)` with trait

This commit is contained in:
Praveen Perera 2022-05-13 10:39:49 -04:00
parent bb0f63298a
commit e409dc2481
No known key found for this signature in database
GPG Key ID: 1A16181AB2972B7B
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ rand_core = "0.4.0"
unicode-normalization = { version = "=0.1.9", optional = true }
rand = { version = "0.6.0", optional = true }
serde = { version = "1.0", default-features = false, optional = true }
zeroize = {version = "1.2", features = ["zeroize_derive"], optional = true}
zeroize = {version = "1.5", features = ["zeroize_derive"], optional = true}
[dev-dependencies]
rand = { version = "0.6.0", optional = false }

View File

@ -56,7 +56,7 @@ use unicode_normalization::UnicodeNormalization;
#[cfg(feature = "zeroize")]
extern crate zeroize;
#[cfg(feature = "zeroize")]
use zeroize::Zeroize;
use zeroize::{Zeroize, ZeroizeOnDrop};
#[macro_use]
mod internal_macros;
@ -157,7 +157,7 @@ impl error::Error for Error {}
///
/// Supported number of words are 12, 18 and 24.
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(feature = "zeroize", derive(Zeroize), zeroize(drop))]
#[cfg_attr(feature = "zeroize", derive(Zeroize, ZeroizeOnDrop))]
pub struct Mnemonic {
/// The language the mnemonic.
lang: Language,