diff --git a/benches/benches/bevy_math/bezier.rs b/benches/benches/bevy_math/bezier.rs index 10645a5997..69590aa804 100644 --- a/benches/benches/bevy_math/bezier.rs +++ b/benches/benches/bevy_math/bezier.rs @@ -20,7 +20,8 @@ fn cubic_2d(c: &mut Criterion) { vec2(1.0, 0.0), vec2(1.0, 1.0), ]]) - .to_curve(); + .to_curve() + .expect("Unable to build a curve from this data"); c.bench_function("cubic_position_Vec2", |b| { b.iter(|| black_box(bezier.position(black_box(0.5)))); }); @@ -33,7 +34,8 @@ fn cubic(c: &mut Criterion) { vec3a(1.0, 0.0, 0.0), vec3a(1.0, 1.0, 1.0), ]]) - .to_curve(); + .to_curve() + .expect("Unable to build a curve from this data"); c.bench_function("cubic_position_Vec3A", |b| { b.iter(|| black_box(bezier.position(black_box(0.5)))); }); @@ -46,7 +48,8 @@ fn cubic_vec3(c: &mut Criterion) { vec3(1.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0), ]]) - .to_curve(); + .to_curve() + .expect("Unable to build a curve from this data"); c.bench_function("cubic_position_Vec3", |b| { b.iter(|| black_box(bezier.position(black_box(0.5)))); }); @@ -59,7 +62,8 @@ fn build_pos_cubic(c: &mut Criterion) { vec3a(1.0, 0.0, 0.0), vec3a(1.0, 1.0, 1.0), ]]) - .to_curve(); + .to_curve() + .expect("Unable to build a curve from this data"); c.bench_function("build_pos_cubic_100_points", |b| { b.iter(|| black_box(bezier.iter_positions(black_box(100)).collect::>())); }); @@ -72,7 +76,8 @@ fn build_accel_cubic(c: &mut Criterion) { vec3a(1.0, 0.0, 0.0), vec3a(1.0, 1.0, 1.0), ]]) - .to_curve(); + .to_curve() + .expect("Unable to build a curve from this data"); c.bench_function("build_accel_cubic_100_points", |b| { b.iter(|| black_box(bezier.iter_positions(black_box(100)).collect::>())); });