Skip to content

Commit cc13bf8

Browse files
secrecy: impl CloneableSecret for arrays (#1245)
Adds a `CloneableSecret` for arrays of types which are themselves `CloneableSecret`
1 parent 5fefad8 commit cc13bf8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

secrecy/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ impl CloneableSecret for u64 {}
267267
impl CloneableSecret for u128 {}
268268
impl CloneableSecret for usize {}
269269

270+
impl<Z: CloneableSecret, const N: usize> CloneableSecret for [Z; N] {}
271+
270272
/// Expose a reference to an inner secret
271273
pub trait ExposeSecret<S: ?Sized> {
272274
/// Expose secret: this is the only method providing access to a secret.

0 commit comments

Comments
 (0)