Skip to content

Commit 735d289

Browse files
committed
chore: fix lints
1 parent 72bfcfd commit 735d289

7 files changed

Lines changed: 10 additions & 8 deletions

File tree

commit_verify/derive/src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl TryFrom<&Path> for StrategyAttr {
7474
}
7575

7676
impl 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")

commit_verify/derive/tests/base.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

commit_verify/src/convolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ where
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))

commit_verify/src/embed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

commit_verify/src/mpc/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

commit_verify/src/mpc/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl CommitmentId for MerkleTree {
6060

6161
impl 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))

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
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.
5050
pub extern crate commit_verify as commit;
51-
#[allow(missing_docs)]
51+
/// Re-export of `single_use_seals` crate.
5252
pub extern crate single_use_seals as seals;
5353

5454
#[cfg(feature = "serde")]

0 commit comments

Comments
 (0)