Implement common traits for SerdeSecret

Implement Debug, Eq, PartialEq and Clone for SerdeSecret if they
are implemented for the inner type.
This commit is contained in:
Sebastian Geisler 2019-06-25 19:15:05 +02:00 committed by Andreas Fackler
parent 594bfdaa30
commit a40c770abb
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ mod serialize_secret_internal {
/// concerns serialize shouldn't be implemented for secret keys to avoid accidental leakage.
///
/// Whenever this struct is used the integrity of security boundaries should be checked carefully.
#[derive(Debug, Eq, PartialEq, Clone)]
pub struct SerdeSecret<T>(pub T);
impl<T> Deref for SerdeSecret<T> {