From 69b940cbf06985ee1f43945f42a4058b61cf15df Mon Sep 17 00:00:00 2001 From: Robert Bastian <4706271+robertbastian@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:11:44 +0200 Subject: [PATCH] Fix plurals bench (#5474) --- components/plurals/Cargo.toml | 2 +- components/plurals/benches/operands.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/plurals/Cargo.toml b/components/plurals/Cargo.toml index ec5a5d41fd3..88ec6ba823e 100644 --- a/components/plurals/Cargo.toml +++ b/components/plurals/Cargo.toml @@ -46,7 +46,7 @@ std = ["fixed_decimal/std", "icu_locale_core/std", "icu_provider/std"] serde = ["dep:serde", "zerovec/serde", "icu_locale_core/serde", "icu_provider/serde"] datagen = ["serde", "zerovec/databake", "dep:databake"] experimental = [] -bench = ["serde"] +bench = ["serde", "datagen"] compiled_data = ["dep:icu_plurals_data"] [lib] diff --git a/components/plurals/benches/operands.rs b/components/plurals/benches/operands.rs index 0a2348b4399..d1e724870ba 100644 --- a/components/plurals/benches/operands.rs +++ b/components/plurals/benches/operands.rs @@ -74,7 +74,7 @@ fn operands(c: &mut Criterion) { } } c.bench_function("plurals/operands/eq/mostly_unequal", |b| { - let p: PluralOperands = "1".parse().expect("Parse successful"); + let p: PluralOperands = 1.into(); b.iter(|| { for s in &data.isize { let q: PluralOperands = black_box(*s).into();