bheisler / criterion.rs

Statistics-driven benchmarking library for Rust
Apache License 2.0
4.31k stars 292 forks source link

iter_batched comments should say clone not to_vec #715

Open jkugelman opened 11 months ago

jkugelman commented 11 months ago

In bencher.rs there are four doc comments like this:

/// c.bench_function("with_setup", move |b| {
///     // This will avoid timing the to_vec call.
///     b.iter_batched(|| data.clone(), /* ... */)
/// });

They should say clone not to_vec because the setup code is || data.clone().