Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethloeffler committed Oct 31, 2024
1 parent 91c6e2d commit e5bb471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rbx_binary/benches/suite/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ fn serialize_bench<T: Measurement>(group: &mut BenchmarkGroup<T>, tree: &WeakDom
let root_ref = tree.root_ref();
let mut buffer = Vec::new();

rbx_binary::to_writer(&mut buffer, &tree, &[root_ref]).unwrap();
rbx_binary::to_writer(&mut buffer, tree, &[root_ref]).unwrap();
let buffer_len = buffer.len();

group.bench_function("Serialize", |b| {
b.iter_batched(
|| Vec::with_capacity(buffer_len),
|mut buffer: Vec<u8>| {
rbx_binary::to_writer(&mut buffer, &tree, &[root_ref]).unwrap();
rbx_binary::to_writer(&mut buffer, tree, &[root_ref]).unwrap();
},
BatchSize::SmallInput,
)
Expand Down

0 comments on commit e5bb471

Please sign in to comment.