Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/catalyst-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workspace = true

[dependencies]
anyhow = "1.0.89"
rand_core = "0.6.4"
rand_core = { version = "0.6.4", features = ["getrandom"] }
rand_chacha = "0.3.1"
curve25519-dalek = { version = "4.1.3", features = ["digest", "rand_core"] }
ed25519-dalek = { version = "2.1.1", features = ["rand_core"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ impl Scalar {
/// # Errors
/// - Cannot decode scalar.
pub fn from_bytes(bytes: [u8; Self::BYTES_SIZE]) -> anyhow::Result<Scalar> {
IScalar::from_canonical_bytes(bytes)
Into::<Option<_>>::into(IScalar::from_canonical_bytes(bytes))
.map(Scalar)
.into_option()
.ok_or(anyhow!("Cannot decode scalar."))
}

Expand Down
Loading