Resolve a build issue with bip32 when there are competing versions of generic-array in the dependency tree. Using GenericArray::as_slice is more deterministic.
@@ -68,7 +68,10 @@ impl PublicKey for k256::ecdsa::VerifyingKey {
}
fn to_bytes(&self) -> PublicKeyBytes {
- self.to_bytes().as_ref().try_into().expect("malformed key")
+ self.to_bytes()
+ .as_slice()
+ .try_into()
+ .expect("malformed key")
}
fn derive_child(&self, other: PrivateKeyBytes) -> Result<Self> {
