mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Restore type complexity checks in CI
Passes due to the remaining type complexity cases being explicitly allowed.
This commit is contained in:
parent
0350cd803d
commit
0ca52a36ee
6 changed files with 10 additions and 2 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
rust-components: clippy
|
||||
|
||||
- name: Run Clippy
|
||||
run: cargo clippy --all-features -- -D warnings -A clippy::type_complexity -A dead_code
|
||||
run: cargo clippy --all-features -- -D warnings -A dead_code
|
||||
|
||||
deny:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -249,6 +249,7 @@ pub struct SecretShareMachine<C: Ciphersuite> {
|
|||
|
||||
impl<C: Ciphersuite> SecretShareMachine<C> {
|
||||
/// Verify the data from the previous round (canonicity, PoKs, message authenticity)
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn verify_r1<R: RngCore + CryptoRng>(
|
||||
&mut self,
|
||||
rng: &mut R,
|
||||
|
@ -286,6 +287,7 @@ impl<C: Ciphersuite> SecretShareMachine<C> {
|
|||
/// Continue generating a key.
|
||||
/// Takes in everyone else's commitments. Returns a HashMap of secret shares to be sent over
|
||||
/// authenticated channels to their relevant counterparties.
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub fn generate_secret_shares<R: RngCore + CryptoRng>(
|
||||
mut self,
|
||||
rng: &mut R,
|
||||
|
|
|
@ -78,7 +78,7 @@ where
|
|||
(((generators.0.alt * s.0) - (A.0 * e.0)), ((generators.1.alt * s.1) - (A.1 * e.1)))
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_snake_case, clippy::type_complexity)]
|
||||
fn R_batch(
|
||||
generators: (Generators<G0>, Generators<G1>),
|
||||
s: (G0::Scalar, G1::Scalar),
|
||||
|
|
|
@ -183,6 +183,7 @@ where
|
|||
res
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn prove_internal<R: RngCore + CryptoRng, T: Clone + Transcript>(
|
||||
rng: &mut R,
|
||||
transcript: &mut T,
|
||||
|
@ -283,6 +284,7 @@ where
|
|||
/// It also ensures a lack of determinable relation between keys, guaranteeing security in the
|
||||
/// currently expected use case for this, atomic swaps, where each swap leaks the key. Knowing
|
||||
/// the relationship between keys would allow breaking all swaps after just one.
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub fn prove<R: RngCore + CryptoRng, T: Clone + Transcript, D: Digest + HashMarker>(
|
||||
rng: &mut R,
|
||||
transcript: &mut T,
|
||||
|
@ -304,6 +306,7 @@ where
|
|||
/// Prove the cross-Group Discrete Log Equality for the points derived from the scalar passed in,
|
||||
/// failing if it's not mutually valid. This allows for rejection sampling externally derived
|
||||
/// scalars until they're safely usable, as needed.
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub fn prove_without_bias<R: RngCore + CryptoRng, T: Clone + Transcript>(
|
||||
rng: &mut R,
|
||||
transcript: &mut T,
|
||||
|
|
|
@ -8,6 +8,7 @@ use group::Group;
|
|||
use crate::{multiexp, multiexp_vartime};
|
||||
|
||||
/// A batch verifier intended to verify a series of statements are each equivalent to zero.
|
||||
#[allow(clippy::type_complexity)]
|
||||
#[derive(Clone, Zeroize)]
|
||||
pub struct BatchVerifier<Id: Copy + Zeroize, G: Group + Zeroize>(Vec<(Id, Vec<(G::Scalar, G)>)>);
|
||||
|
||||
|
|
|
@ -180,6 +180,7 @@ fn refine_inputs<C: Coin>(
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn select_inputs_outputs<C: Coin>(
|
||||
inputs: &mut Vec<C::Output>,
|
||||
outputs: &mut Vec<(C::Address, u64)>,
|
||||
|
@ -200,6 +201,7 @@ fn select_inputs_outputs<C: Coin>(
|
|||
(selected, outputs)
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub struct Wallet<D: CoinDb, C: Coin> {
|
||||
db: D,
|
||||
coin: C,
|
||||
|
|
Loading…
Reference in a new issue