Skip to content

Commit

Permalink
docs(rust): Fill in blank doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj committed May 8, 2024
1 parent ff771b7 commit 4b870e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/rust/crates/foo/benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ fn test_fibonacci() {
assert_eq!(fibonacci(20), 6765);
}

///
/// fibonacci calculates the nth fibonacci number
fn fibonacci(n: u64) -> u64 {
match n {
0 | 1 => 1,
n => fibonacci(n - 1) + fibonacci(n - 2),
}
}

///
/// run a criterion benchmark
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20))));
}
Expand Down

0 comments on commit 4b870e1

Please sign in to comment.