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> {
|
pub fn tweak(value: &[u8; 32]) -> Result<Self, LeeError> {
|
||||||
assert!(Self::is_valid_key(*value));
|
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 mut bytes = vec![];
|
||||||
let pk = sk.public_key();
|
let pk = sk.public_key();
|
||||||
@ -75,10 +75,11 @@ impl PrivateKey {
|
|||||||
|
|
||||||
Self::try_new(
|
Self::try_new(
|
||||||
k256::Scalar::from_repr((*value).into())
|
k256::Scalar::from_repr((*value).into())
|
||||||
.unwrap()
|
.expect("Expect a valid k256 scalar")
|
||||||
.add(&k256::Scalar::from_repr(hashed.into()).unwrap())
|
.add(&k256::Scalar::from_repr(hashed.into()).expect("Expect a valid k256 scalar"))
|
||||||
.to_bytes()
|
.to_bytes()
|
||||||
.into(),
|
.into(),
|
||||||
|
>>>>>>> b2e99c4a (clippy fixes):nssa/src/signature/private_key.rs
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user