mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Port common, and most of crypto, to a more aggressive clippy
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use zeroize::Zeroize;
|
||||
|
||||
use digest::{
|
||||
typenum::U114, core_api::BlockSizeUser, Update, Output, OutputSizeUser, FixedOutput,
|
||||
ExtendableOutput, XofReader, HashMarker, Digest,
|
||||
typenum::U114, generic_array::GenericArray, core_api::BlockSizeUser, Update, Output,
|
||||
OutputSizeUser, FixedOutput, ExtendableOutput, XofReader, HashMarker, Digest,
|
||||
};
|
||||
use sha3::Shake256;
|
||||
|
||||
@@ -37,7 +37,7 @@ impl Update for Shake256_114 {
|
||||
}
|
||||
impl FixedOutput for Shake256_114 {
|
||||
fn finalize_fixed(self) -> Output<Self> {
|
||||
let mut res = Default::default();
|
||||
let mut res = GenericArray::default();
|
||||
FixedOutput::finalize_into(self, &mut res);
|
||||
res
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ fn test_secp256k1() {
|
||||
)
|
||||
.to_repr()
|
||||
.iter()
|
||||
.cloned()
|
||||
.copied()
|
||||
.collect::<Vec<_>>(),
|
||||
hex::decode("acc83278035223c1ba464e2d11bfacfc872b2b23e1041cf5f6130da21e4d8068").unwrap()
|
||||
);
|
||||
@@ -167,7 +167,7 @@ f4e8cf80aec3f888d997900ac7e3e349944b5a6b47649fc32186d2f1238103c6\
|
||||
)
|
||||
.to_repr()
|
||||
.iter()
|
||||
.cloned()
|
||||
.copied()
|
||||
.collect::<Vec<_>>(),
|
||||
hex::decode("f871dfcf6bcd199342651adc361b92c941cb6a0d8c8c1a3b91d79e2c1bf3722d").unwrap()
|
||||
);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::self_named_module_files)] // False positive?
|
||||
#![allow(clippy::tests_outside_test_module)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![doc = include_str!("lib.md")]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
Reference in New Issue
Block a user