Skip to content

Commit

Permalink
Fix fmt and use to_writer
Browse files Browse the repository at this point in the history
  • Loading branch information
quininer authored Nov 2, 2023
1 parent 0469b29 commit baa0eba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/bench_cbor4ii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ where
group.bench_function("serialize", |b| {
b.iter(|| {
serialize_buffer.clear();
cbor4ii::serde::to_writer(
black_box(&mut serialize_buffer),
black_box(&data),
)
.unwrap();
cbor4ii::serde::to_writer(black_box(&mut serialize_buffer), black_box(&data)).unwrap();
black_box(());
})
});

let deserialize_buffer = cbor4ii::serde::to_vec(Vec::new(), &data).unwrap();
let mut deserialize_buffer = Vec::new();
cbor4ii::serde::to_writer(&mut deserialize_buffer, &data).unwrap();

group.bench_function("deserialize", |b| {
b.iter(|| {
Expand Down

0 comments on commit baa0eba

Please sign in to comment.