@@ -13,6 +13,7 @@ use dodrio::{
13 CachedSet, Node, Render, RenderContext, Vdom,
13 CachedSet, Node, Render, RenderContext, Vdom,
15use std::cell::RefCell;
15use std::cell::RefCell;
16+use std::convert::TryInto;
17/// The simplest thing we can render: `<div/>`.
18/// The simplest thing we can render: `<div/>`.
18struct Empty;
19struct Empty;
@@ -73,16 +74,9 @@ fn criterion_benchmark(c: &mut Criterion) {
77− // TODO: Only test one `n` value until
78− // https://github.com/bheisler/criterion.rs/issues/269 is fixed.
82− 10_000,
77+ vec![100, 1_000, 10_000],
85− .throughput(|n| Throughput::Elements(*n as u32)),
79+ .throughput(|n| Throughput::Elements((*n).try_into().unwrap())),
@@ -96,14 +90,7 @@ fn criterion_benchmark(c: &mut Criterion) {
96 black_box(&vdom);
90 black_box(&vdom);
100− // TODO: Only test one `n` value until
101− // https://github.com/bheisler/criterion.rs/issues/269 is fixed.
105− 10_000,
93+ vec![100, 1_000, 10_000],
108 .with_function("empty-to-full-list-to-empty", |b, &n| {
95 .with_function("empty-to-full-list-to-empty", |b, &n| {
109 b.iter(|| {
96 b.iter(|| {
@@ -123,7 +110,7 @@ fn criterion_benchmark(c: &mut Criterion) {
123 black_box(&vdom);
110 black_box(&vdom);
126− .throughput(|n| Throughput::Elements(*n as u32)),
113+ .throughput(|n| Throughput::Elements((*n).try_into().unwrap())),