Skip to content

Commit

Permalink
secrecy: impl CloneableSecret for arrays (#1245)
Browse files Browse the repository at this point in the history
Adds a `CloneableSecret` for arrays of types which are themselves
`CloneableSecret`
  • Loading branch information
tony-iqlusion authored Oct 29, 2024
1 parent 5fefad8 commit cc13bf8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions secrecy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ impl CloneableSecret for u64 {}
impl CloneableSecret for u128 {}
impl CloneableSecret for usize {}

impl<Z: CloneableSecret, const N: usize> CloneableSecret for [Z; N] {}

/// Expose a reference to an inner secret
pub trait ExposeSecret<S: ?Sized> {
/// Expose secret: this is the only method providing access to a secret.
Expand Down

0 comments on commit cc13bf8

Please sign in to comment.