File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ type Transcript<P> = (
3838#[ derive( Debug ) ]
3939pub struct NISigmaProtocol < P , C >
4040where
41- P : SigmaProtocol < Challenge : PartialEq > ,
41+ P : SigmaProtocol ,
42+ P :: Challenge : PartialEq ,
4243 C : Codec < Challenge = P :: Challenge > ,
4344{
4445 /// Current codec state.
4950
5051impl < P , C > NISigmaProtocol < P , C >
5152where
52- P : SigmaProtocol < Challenge : PartialEq > ,
53+ P : SigmaProtocol ,
54+ P :: Challenge : PartialEq ,
5355 C : Codec < Challenge = P :: Challenge > + Clone ,
5456{
5557 /// Constructs a new [`NISigmaProtocol`] instance.
@@ -191,7 +193,8 @@ where
191193
192194impl < P , C > NISigmaProtocol < P , C >
193195where
194- P : SigmaProtocol < Challenge : PartialEq > ,
196+ P : SigmaProtocol ,
197+ P :: Challenge : PartialEq ,
195198 C : Codec < Challenge = P :: Challenge > + Clone ,
196199{
197200 /// Generates a compact serialized proof.
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ impl SRandom for G1Projective {
3535 assert ! ( l <= h) ;
3636 let range = h - l + BigUint :: one ( ) ;
3737 let bits = range. bits ( ) ;
38- let bytes_needed = bits. div_ceil ( 8 ) as usize ;
38+ #[ allow( clippy:: manual_div_ceil) ]
39+ let bytes_needed = ( ( bits + 7 ) / 8 ) as usize ;
3940
4041 loop {
4142 let mut buf = vec ! [ 0u8 ; bytes_needed] ;
You can’t perform that action at this time.
0 commit comments