File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ impl TryFrom<&Path> for StrategyAttr {
7474}
7575
7676impl StrategyAttr {
77- pub fn to_ident ( & self ) -> Ident {
77+ pub fn to_ident ( self ) -> Ident {
7878 match self {
7979 StrategyAttr :: CommitEncoding => {
8080 panic ! ( "StrategyAttr::CommitEncoding must be derived manually" )
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ fn strategy_transparent() -> common::Result {
5353 struct ShortLen ( u16 ) ;
5454
5555 verify_commit ( ShortLen ( 0 ) , [ 0 , 0 ] ) ;
56+ #[ allow( clippy:: mixed_case_hex_literals) ]
5657 verify_commit ( ShortLen ( 0xFFde ) , [ 0xde , 0xFF ] ) ;
5758
5859 Ok ( ( ) )
@@ -69,6 +70,7 @@ fn strategy_into_u8() -> common::Result {
6970 B ,
7071 C ,
7172 }
73+ #[ allow( clippy:: from_over_into) ]
7274 impl Into < u8 > for Prim {
7375 fn into ( self ) -> u8 { self as u8 }
7476 }
Original file line number Diff line number Diff line change 7373 where
7474 Self : VerifyEq ,
7575 {
76- let original = self . restore_original ( & commitment) ;
76+ let original = self . restore_original ( commitment) ;
7777 let suppl = self . extract_supplement ( ) ;
7878 let ( commitment_prime, proof) = original. convolve_commit ( suppl, msg) ?;
7979 Ok ( commitment. verify_eq ( & commitment_prime) && self . verify_eq ( & proof) )
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ where
155155 {
156156 let mut container_prime = proof. restore_original_container ( self ) ?;
157157 let proof_prime = container_prime. embed_commit ( msg) ?;
158- Ok ( proof_prime. verify_eq ( & proof) && self . verify_eq ( & container_prime) )
158+ Ok ( proof_prime. verify_eq ( proof) && self . verify_eq ( & container_prime) )
159159 }
160160
161161 /// Phantom method used to add `Protocol` generic parameter to the trait.
@@ -264,7 +264,7 @@ pub(crate) mod test_helpers {
264264 acc. iter ( ) . for_each ( |commitment| {
265265 // Testing that verification against other commitments
266266 // returns `false`
267- assert ! ( !SUPPLEMENT . verify( msg, & commitment) . unwrap( ) ) ;
267+ assert ! ( !SUPPLEMENT . verify( msg, commitment) . unwrap( ) ) ;
268268 } ) ;
269269
270270 // Detecting collision: each message should produce a unique
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ impl From<&MerkleTree> for MerkleBlock {
132132 fn from ( tree : & MerkleTree ) -> Self {
133133 let map = & tree. map ;
134134
135- let iter = ( 0 ..tree. width ( ) ) . into_iter ( ) . map ( |pos| {
135+ let iter = ( 0 ..tree. width ( ) ) . map ( |pos| {
136136 map. get ( & pos)
137137 . map ( |( protocol_id, message) | TreeNode :: CommitmentLeaf {
138138 protocol_id : * protocol_id,
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ impl CommitmentId for MerkleTree {
6060
6161impl MerkleTree {
6262 pub fn root ( & self ) -> MerkleNode {
63- let iter = ( 0 ..self . width ( ) ) . into_iter ( ) . map ( |pos| {
63+ let iter = ( 0 ..self . width ( ) ) . map ( |pos| {
6464 self . map
6565 . get ( & pos)
6666 . map ( |( protocol, msg) | Leaf :: inhabited ( * protocol, * msg) )
Original file line number Diff line number Diff line change 4646//! standardizing typical workflow processes in a form of interfaces that
4747//! will be nearly impossible to use in a wrong way.
4848
49- # [ allow ( missing_docs ) ]
49+ /// Re-export of `commit_verify` crate.
5050pub extern crate commit_verify as commit;
51- # [ allow ( missing_docs ) ]
51+ /// Re-export of `single_use_seals` crate.
5252pub extern crate single_use_seals as seals;
5353
5454#[ cfg( feature = "serde" ) ]
You can’t perform that action at this time.
0 commit comments