Latest clippy

This commit is contained in:
Luke Parker
2023-08-01 02:49:31 -04:00
parent c338b92067
commit 53d86e2a29
12 changed files with 21 additions and 13 deletions

View File

@@ -95,7 +95,7 @@ async fn check_block(rpc: Arc<Rpc<HttpRpc>>, block_i: usize) {
}
let mut batch = BatchVerifier::new(block.txs.len());
for (tx_hash, tx_res) in block.txs.into_iter().zip(all_txs.into_iter()) {
for (tx_hash, tx_res) in block.txs.into_iter().zip(all_txs) {
assert_eq!(
tx_res.tx_hash,
hex::encode(tx_hash),

View File

@@ -12,6 +12,7 @@ use multiexp::multiexp;
pub(crate) struct ScalarVector(pub(crate) Vec<Scalar>);
macro_rules! math_op {
($Op: ident, $op: ident, $f: expr) => {
#[allow(clippy::redundant_closure_call)]
impl $Op<Scalar> for ScalarVector {
type Output = ScalarVector;
fn $op(self, b: Scalar) -> ScalarVector {
@@ -19,6 +20,7 @@ macro_rules! math_op {
}
}
#[allow(clippy::redundant_closure_call)]
impl $Op<Scalar> for &ScalarVector {
type Output = ScalarVector;
fn $op(self, b: Scalar) -> ScalarVector {
@@ -26,6 +28,7 @@ macro_rules! math_op {
}
}
#[allow(clippy::redundant_closure_call)]
impl $Op<ScalarVector> for ScalarVector {
type Output = ScalarVector;
fn $op(self, b: ScalarVector) -> ScalarVector {
@@ -34,6 +37,7 @@ macro_rules! math_op {
}
}
#[allow(clippy::redundant_closure_call)]
impl $Op<&ScalarVector> for &ScalarVector {
type Output = ScalarVector;
fn $op(self, b: &ScalarVector) -> ScalarVector {

View File

@@ -34,7 +34,7 @@ async fn add_inputs(
.await
.unwrap();
let inputs = spendable_outputs.into_iter().zip(decoys.into_iter()).collect::<Vec<_>>();
let inputs = spendable_outputs.into_iter().zip(decoys).collect::<Vec<_>>();
builder.add_inputs(&inputs);
}