Skip to content

Commit c7abb6f

Browse files
authored
transports/noise: Fix compilation with additional generic-array features (#2264)
For crate that depends on `generic-array = { version = "0.14.3", features = ["serde", "more_lengths"] }` It's seems that `as_ref()` is ambiguous.
1 parent 5cbd473 commit c7abb6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transports/noise/src/protocol/x25519.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl SecretKey<X25519> {
219219
// let ed25519_sk = ed25519::SecretKey::from(ed);
220220
let mut curve25519_sk: [u8; 32] = [0; 32];
221221
let hash = Sha512::digest(ed25519_sk.as_ref());
222-
curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
222+
curve25519_sk.copy_from_slice(&hash[..32]);
223223
let sk = SecretKey(X25519(curve25519_sk)); // Copy
224224
curve25519_sk.zeroize();
225225
sk

0 commit comments

Comments
 (0)