Replace deprecated `zeroize(drop)` with trait
This commit is contained in:
parent
bb0f63298a
commit
e409dc2481
|
@ -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 }
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue