Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Jun 13, 2024
1 parent 23147ed commit 2886fe6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions zk-sdk/src/encryption/elgamal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,7 @@ impl DecryptHandle {
return None;
};

let Some(ristretto_point) = compressed_ristretto.decompress() else {
return None;
};
let ristretto_point = compressed_ristretto.decompress()?;

Some(DecryptHandle(ristretto_point))
}
Expand Down
4 changes: 1 addition & 3 deletions zk-sdk/src/encryption/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ impl PedersenCommitment {
return None;
};

let Some(ristretto_point) = compressed_ristretto.decompress() else {
return None;
};
let ristretto_point = compressed_ristretto.decompress()?;

Some(PedersenCommitment(ristretto_point))
}
Expand Down
8 changes: 2 additions & 6 deletions zk-token-sdk/src/encryption/elgamal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,7 @@ impl ElGamalPubkey {
return None;
};

let Some(ristretto_point) = compressed_ristretto.decompress() else {
return None;
};
let ristretto_point = compressed_ristretto.decompress()?;

Some(ElGamalPubkey(ristretto_point))
}
Expand Down Expand Up @@ -815,9 +813,7 @@ impl DecryptHandle {
return None;
};

let Some(ristretto_point) = compressed_ristretto.decompress() else {
return None;
};
let ristretto_point = compressed_ristretto.decompress()?;

Some(DecryptHandle(ristretto_point))
}
Expand Down
4 changes: 1 addition & 3 deletions zk-token-sdk/src/encryption/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ impl PedersenCommitment {
return None;
};

let Some(ristretto_point) = compressed_ristretto.decompress() else {
return None;
};
let ristretto_point = compressed_ristretto.decompress()?;

Some(PedersenCommitment(ristretto_point))
}
Expand Down

0 comments on commit 2886fe6

Please sign in to comment.