mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Run latest nightly clippy
Also runs clippy on the tests and updates the CI accordingly
This commit is contained in:
@@ -129,12 +129,11 @@ pub fn test_encoding<G: PrimeGroup>() {
|
||||
let bytes = point.to_bytes();
|
||||
let mut repr = G::Repr::default();
|
||||
repr.as_mut().copy_from_slice(bytes.as_ref());
|
||||
assert_eq!(point, G::from_bytes(&repr).unwrap(), "{} couldn't be encoded and decoded", msg);
|
||||
assert_eq!(point, G::from_bytes(&repr).unwrap(), "{msg} couldn't be encoded and decoded");
|
||||
assert_eq!(
|
||||
point,
|
||||
G::from_bytes_unchecked(&repr).unwrap(),
|
||||
"{} couldn't be encoded and decoded",
|
||||
msg
|
||||
"{msg} couldn't be encoded and decoded",
|
||||
);
|
||||
};
|
||||
test(G::identity(), "identity");
|
||||
|
||||
@@ -43,12 +43,11 @@ pub fn test_encoding<F: PrimeField>() {
|
||||
let bytes = scalar.to_repr();
|
||||
let mut repr = F::Repr::default();
|
||||
repr.as_mut().copy_from_slice(bytes.as_ref());
|
||||
assert_eq!(scalar, F::from_repr(repr).unwrap(), "{} couldn't be encoded and decoded", msg);
|
||||
assert_eq!(scalar, F::from_repr(repr).unwrap(), "{msg} couldn't be encoded and decoded");
|
||||
assert_eq!(
|
||||
scalar,
|
||||
F::from_repr_vartime(repr).unwrap(),
|
||||
"{} couldn't be encoded and decoded",
|
||||
msg
|
||||
"{msg} couldn't be encoded and decoded",
|
||||
);
|
||||
};
|
||||
test(F::zero(), "0");
|
||||
|
||||
Reference in New Issue
Block a user