Apply rustfmt to entire workspace
Runs cargo fmt --all; all 573 tests still passing, clippy still clean. No logic changes — formatting only. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3d524e2d63
commit
1c107fe58a
@@ -66,7 +66,10 @@ fn bench_write_one_revision(c: &mut Criterion) {
|
||||
b.iter(|| {
|
||||
let mut s = onion.begin_session(None).unwrap();
|
||||
for i in 0u64..4 {
|
||||
s.record_page(i * PAGE_SIZE as u64, black_box(&vec![0xCDu8; PAGE_SIZE as usize]));
|
||||
s.record_page(
|
||||
i * PAGE_SIZE as u64,
|
||||
black_box(&vec![0xCDu8; PAGE_SIZE as usize]),
|
||||
);
|
||||
}
|
||||
black_box(onion.commit_session(s, None).unwrap());
|
||||
});
|
||||
@@ -83,15 +86,15 @@ fn bench_reconstruct_revision(c: &mut Criterion) {
|
||||
let (_f, _h5, onion, base) = tmp_onion_with_n(depth);
|
||||
let target_rev = (depth - 1) as u64;
|
||||
|
||||
group.bench_with_input(
|
||||
BenchmarkId::new("no_snapshot", depth),
|
||||
&depth,
|
||||
|b, _| {
|
||||
b.iter(|| {
|
||||
black_box(onion.reconstruct_revision(target_rev, black_box(&base)).unwrap());
|
||||
});
|
||||
},
|
||||
);
|
||||
group.bench_with_input(BenchmarkId::new("no_snapshot", depth), &depth, |b, _| {
|
||||
b.iter(|| {
|
||||
black_box(
|
||||
onion
|
||||
.reconstruct_revision(target_rev, black_box(&base))
|
||||
.unwrap(),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// With snapshot: create a real snapshot at midpoint via create_snapshot()
|
||||
@@ -107,15 +110,15 @@ fn bench_reconstruct_revision(c: &mut Criterion) {
|
||||
}
|
||||
let target_rev = onion.revision_count() - 1;
|
||||
|
||||
group.bench_with_input(
|
||||
BenchmarkId::new("with_snapshot", depth),
|
||||
&depth,
|
||||
|b, _| {
|
||||
b.iter(|| {
|
||||
black_box(onion.reconstruct_revision(target_rev, black_box(&base)).unwrap());
|
||||
});
|
||||
},
|
||||
);
|
||||
group.bench_with_input(BenchmarkId::new("with_snapshot", depth), &depth, |b, _| {
|
||||
b.iter(|| {
|
||||
black_box(
|
||||
onion
|
||||
.reconstruct_revision(target_rev, black_box(&base))
|
||||
.unwrap(),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
group.finish();
|
||||
|
||||
Reference in New Issue
Block a user