Skip to content

Commit

Permalink
refactor(storage-proofs): all clippy lint unit_arg
Browse files Browse the repository at this point in the history
We use the `black_box` function in a bunch of places, at times the
function argument returns unit, this is to be expected since the
argument is not used for its return value.

Instruct clippy to set the `unit_arg` lint to allow.
  • Loading branch information
tcharding authored and cryptonemo committed Jun 18, 2020
1 parent 5bdc49d commit 3937540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions storage-proofs/core/benches/drgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion, Parameter
use storage_proofs_core::drgraph::*;
use storage_proofs_core::hasher::pedersen::*;

#[allow(clippy::unit_arg)]
fn drgraph(c: &mut Criterion) {
let params = vec![12, 24, 128, 1024];

Expand Down
1 change: 1 addition & 0 deletions storage-proofs/porep/benches/parents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fn parents_loop<H: Hasher, G: Graph<H>>(graph: &G, parents: &mut [u32]) {
.collect()
}

#[allow(clippy::unit_arg)]
fn parents_loop_benchmark(cc: &mut Criterion) {
let sizes = vec![10, 50, 1000];

Expand Down

0 comments on commit 3937540

Please sign in to comment.