diff --git a/Cargo.toml b/Cargo.toml index 91717a9..0d6daa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ hex-literal = "0.4.1" rand = "0.8.5" [features] -default = ["dkg"] +default = ["signing"] std = [] signing = ["dep:blake3", "dep:rand_chacha", "std"] diff --git a/src/lib.rs b/src/lib.rs index 1ddf3dd..d71b0cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,7 @@ mod io { #[cfg(not(feature = "std"))] extern crate alloc; -#[cfg(feature = "dkg")] +#[cfg(not(feature = "std"))] mod io { use core::cmp; use core::mem; diff --git a/src/signing_commitment.rs b/src/signing_commitment.rs index 8d60ac0..46fafd9 100644 --- a/src/signing_commitment.rs +++ b/src/signing_commitment.rs @@ -167,7 +167,7 @@ impl SigningCommitment { pub fn serialize(&self) -> [u8; SIGNING_COMMITMENT_LEN] { let mut bytes = [0u8; SIGNING_COMMITMENT_LEN]; - self.serialize_into(&mut bytes) + self.serialize_into(&mut bytes[..]) .expect("serialization failed"); bytes }