Skip to content

Commit

Permalink
docs: Fix comments to say clone not to_vec (#715) (#716)
Browse files Browse the repository at this point in the history
Co-authored-by: John Kugelman <jkugelman@dragos.com>
  • Loading branch information
jkugelman and John Kugelman committed Dec 1, 2023
1 parent 3bb6a81 commit b5da56e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bencher.rs
Expand Up @@ -223,7 +223,7 @@ impl<'a, M: Measurement> Bencher<'a, M> {
/// let data = create_scrambled_data();
///
/// c.bench_function("with_setup", move |b| {
/// // This will avoid timing the to_vec call.
/// // This will avoid timing the clone call.
/// b.iter_batched(|| data.clone(), |mut data| sort(&mut data), BatchSize::SmallInput)
/// });
/// }
Expand Down Expand Up @@ -313,7 +313,7 @@ impl<'a, M: Measurement> Bencher<'a, M> {
/// let data = create_scrambled_data();
///
/// c.bench_function("with_setup", move |b| {
/// // This will avoid timing the to_vec call.
/// // This will avoid timing the clone call.
/// b.iter_batched(|| data.clone(), |mut data| sort(&mut data), BatchSize::SmallInput)
/// });
/// }
Expand Down Expand Up @@ -602,7 +602,7 @@ impl<'a, 'b, A: AsyncExecutor, M: Measurement> AsyncBencher<'a, 'b, A, M> {
/// let data = create_scrambled_data();
///
/// c.bench_function("with_setup", move |b| {
/// // This will avoid timing the to_vec call.
/// // This will avoid timing the clone call.
/// b.iter_batched(|| data.clone(), |mut data| async move { sort(&mut data).await }, BatchSize::SmallInput)
/// });
/// }
Expand Down Expand Up @@ -700,7 +700,7 @@ impl<'a, 'b, A: AsyncExecutor, M: Measurement> AsyncBencher<'a, 'b, A, M> {
/// let data = create_scrambled_data();
///
/// c.bench_function("with_setup", move |b| {
/// // This will avoid timing the to_vec call.
/// // This will avoid timing the clone call.
/// b.iter_batched(|| data.clone(), |mut data| async move { sort(&mut data).await }, BatchSize::SmallInput)
/// });
/// }
Expand Down

0 comments on commit b5da56e

Please sign in to comment.