Commit 266f41d 1 parent 6b6e85b commit 266f41d Copy full SHA for 266f41d
File tree 6 files changed +15
-9
lines changed
6 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 58
58
with :
59
59
cache-on-failure : " true"
60
60
- name : Run clippy
61
- run : cargo clippy --all --lib --exclude cggmp21-tests -- --no-deps -D clippy::all -D clippy::unwrap_used -D clippy::expect_used
61
+ run : cargo clippy --all --all-features -- lib --exclude cggmp21-tests -- --no-deps -D clippy::all -D clippy::unwrap_used -D clippy::expect_used
62
62
- name : Run clippy tests
63
- run : cargo clippy --tests --lib -- -D clippy::all
63
+ run : cargo clippy --tests --all-features -- lib -- -D clippy::all
64
64
bench :
65
65
runs-on : ubuntu-latest
66
66
permissions :
Original file line number Diff line number Diff line change 1
1
//! Threshold and non-threshold CGGMP21 DKG
2
- #![ allow( non_snake_case) ]
2
+ #![ allow( non_snake_case, clippy :: too_many_arguments ) ]
3
3
4
4
pub mod progress;
5
5
pub mod security_level;
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ impl<E: Curve> Validate for DirtyCoreKeyShare<E> {
151
151
}
152
152
}
153
153
154
+ #[ allow( clippy:: nonminimal_bool) ]
154
155
fn validate_vss_key_share < E : Curve > (
155
156
key_share : & DirtyCoreKeyShare < E > ,
156
157
n : u16 ,
Original file line number Diff line number Diff line change 1
- #[ cfg( feature = "serde" ) ]
1
+ #[ cfg( all ( feature = "serde" , feature = "hd-wallets" ) ) ]
2
2
mod hex_or_bin;
3
3
4
- #[ cfg( feature = "serde" ) ]
4
+ #[ cfg( all ( feature = "serde" , feature = "hd-wallets" ) ) ]
5
5
pub use hex_or_bin:: HexOrBin ;
6
+
7
+ // `hex` dependnecy is only needed when both `serde` and `hd-wallets` features are on.
8
+ // However, we can't express that in Cargo.toml, so whenever `serde` feature is on and
9
+ // `hd-wallets` is off, unused dependency is introduced.
10
+ #[ cfg( all( feature = "serde" , not( feature = "hd-wallets" ) ) ) ]
11
+ use hex as _;
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ where
216
216
where
217
217
S : serde:: Serializer ,
218
218
{
219
- ( & * * self ) . serialize ( serializer)
219
+ ( * * self ) . serialize ( serializer)
220
220
}
221
221
}
222
222
Original file line number Diff line number Diff line change @@ -169,8 +169,7 @@ pub fn convert_from_stark_scalar(
169
169
pub fn random_derivation_path ( rng : & mut impl rand:: RngCore ) -> Vec < u32 > {
170
170
use rand:: Rng ;
171
171
let len = rng. gen_range ( 1 ..=3 ) ;
172
- let path = std:: iter:: repeat_with ( || rng. gen_range ( 0 ..cggmp21:: slip_10:: H ) )
172
+ std:: iter:: repeat_with ( || rng. gen_range ( 0 ..cggmp21:: slip_10:: H ) )
173
173
. take ( len)
174
- . collect :: < Vec < _ > > ( ) ;
175
- path
174
+ . collect :: < Vec < _ > > ( )
176
175
}
You can’t perform that action at this time.
0 commit comments