mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-06-30 02:49:53 +00:00
clippy fixes
This commit is contained in:
parent
2ba7095029
commit
6243d08f92
@ -66,7 +66,7 @@ impl PrivateKey {
|
||||
pub fn tweak(value: &[u8; 32]) -> Result<Self, LeeError> {
|
||||
assert!(Self::is_valid_key(*value));
|
||||
|
||||
let sk = k256::SecretKey::from_bytes(value.into()).unwrap();
|
||||
let sk = k256::SecretKey::from_bytes(value.into()).expect("Expect a valid secret key");
|
||||
|
||||
let mut bytes = vec![];
|
||||
let pk = sk.public_key();
|
||||
@ -75,10 +75,11 @@ impl PrivateKey {
|
||||
|
||||
Self::try_new(
|
||||
k256::Scalar::from_repr((*value).into())
|
||||
.unwrap()
|
||||
.add(&k256::Scalar::from_repr(hashed.into()).unwrap())
|
||||
.expect("Expect a valid k256 scalar")
|
||||
.add(&k256::Scalar::from_repr(hashed.into()).expect("Expect a valid k256 scalar"))
|
||||
.to_bytes()
|
||||
.into(),
|
||||
>>>>>>> b2e99c4a (clippy fixes):nssa/src/signature/private_key.rs
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user