Skip to content

Commit 5194892

Browse files
committed
fix warnings in benches and solve bincode dependency
1 parent 8a57444 commit 5194892

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ winter-utils = { git = "https://github.com/lambdaclass/winterfell-for-lambdawork
5454
winter-crypto = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
5555
bincode = { tag = "v2.0.1", git = "https://git.sr.ht/~stygianentity/bincode" }
5656

57-
[patch."https://github.com/bincode-org/bincode.git?tag=v2.0.0-rc.2"]
57+
[patch."https://github.com/bincode-org/bincode.git"]
5858
bincode = { tag = "v2.0.1", git = "https://git.sr.ht/~stygianentity/bincode" }
5959

6060
[profile.bench]

crates/math/benches/fields/baby_bear.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn babybear_p3_ops_benchmarks(c: &mut Criterion) {
357357
group.bench_with_input(format!("Addition {:?}", &i.len()), &i, |bench, i| {
358358
bench.iter(|| {
359359
for (x, y) in i {
360-
black_box(black_box(*x) + black_box(*y));
360+
let _ = black_box(black_box(*x) + black_box(*y));
361361
}
362362
});
363363
});
@@ -367,7 +367,7 @@ pub fn babybear_p3_ops_benchmarks(c: &mut Criterion) {
367367
group.bench_with_input(format!("Multiplication {:?}", &i.len()), &i, |bench, i| {
368368
bench.iter(|| {
369369
for (x, y) in i {
370-
black_box(black_box(*x) * black_box(*y));
370+
let _ = black_box(black_box(*x) * black_box(*y));
371371
}
372372
});
373373
});
@@ -377,7 +377,7 @@ pub fn babybear_p3_ops_benchmarks(c: &mut Criterion) {
377377
group.bench_with_input(format!("Square {:?}", &i.len()), &i, |bench, i| {
378378
bench.iter(|| {
379379
for (x, _) in i {
380-
black_box(black_box(x).square());
380+
let _ = black_box(black_box(x).square());
381381
}
382382
});
383383
});
@@ -386,7 +386,7 @@ pub fn babybear_p3_ops_benchmarks(c: &mut Criterion) {
386386
group.bench_with_input(format!("Inverse {:?}", &i.len()), &i, |bench, i| {
387387
bench.iter(|| {
388388
for (x, _) in i {
389-
black_box(black_box(x).inverse());
389+
let _ = black_box(black_box(x).inverse());
390390
}
391391
});
392392
});
@@ -396,7 +396,7 @@ pub fn babybear_p3_ops_benchmarks(c: &mut Criterion) {
396396
group.bench_with_input(format!("Division {:?}", &i.len()), &i, |bench, i| {
397397
bench.iter(|| {
398398
for (x, y) in i {
399-
black_box(black_box(*x) / black_box(*y));
399+
let _ = black_box(black_box(*x) / black_box(*y));
400400
}
401401
});
402402
});
@@ -416,7 +416,7 @@ pub fn babybear_extension_ops_benchmarks_p3(c: &mut Criterion) {
416416
group.bench_with_input(format!("Addition of Fp4 {:?}", &i.len()), &i, |bench, i| {
417417
bench.iter(|| {
418418
for (x, y) in i {
419-
black_box(black_box(*x) + black_box(*y));
419+
let _ = black_box(black_box(*x) + black_box(*y));
420420
}
421421
});
422422
});
@@ -428,7 +428,7 @@ pub fn babybear_extension_ops_benchmarks_p3(c: &mut Criterion) {
428428
|bench, i| {
429429
bench.iter(|| {
430430
for (x, y) in i {
431-
black_box(black_box(*x) * black_box(*y));
431+
let _ = black_box(black_box(*x) * black_box(*y));
432432
}
433433
});
434434
},
@@ -438,7 +438,7 @@ pub fn babybear_extension_ops_benchmarks_p3(c: &mut Criterion) {
438438
group.bench_with_input(format!("Square of Fp4 {:?}", &i.len()), &i, |bench, i| {
439439
bench.iter(|| {
440440
for (x, _) in i {
441-
black_box(black_box(x).square());
441+
let _ = black_box(black_box(x).square());
442442
}
443443
});
444444
});
@@ -448,7 +448,7 @@ pub fn babybear_extension_ops_benchmarks_p3(c: &mut Criterion) {
448448
group.bench_with_input(format!("Inverse of Fp4 {:?}", &i.len()), &i, |bench, i| {
449449
bench.iter(|| {
450450
for (x, _) in i {
451-
black_box(black_box(x).inverse());
451+
let _ = black_box(black_box(x).inverse());
452452
}
453453
});
454454
});
@@ -458,7 +458,7 @@ pub fn babybear_extension_ops_benchmarks_p3(c: &mut Criterion) {
458458
group.bench_with_input(format!("Division of Fp4 {:?}", &i.len()), &i, |bench, i| {
459459
bench.iter(|| {
460460
for (x, y) in i {
461-
black_box(black_box(*x) / black_box(*y));
461+
let _ = black_box(black_box(*x) / black_box(*y));
462462
}
463463
});
464464
});

0 commit comments

Comments
 (0)