From 215e49274c838d0561f0b736f169d07c26255a56 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Wed, 18 Dec 2024 14:20:43 +0200 Subject: [PATCH] Adapt bench setup to API change --- components/normalizer/benches/canonical_decomposition.rs | 8 ++++---- components/normalizer/benches/composing_normalizer_nfc.rs | 8 ++++---- .../normalizer/benches/composing_normalizer_nfkc.rs | 8 ++++---- .../normalizer/benches/decomposing_normalizer_nfd.rs | 8 ++++---- .../normalizer/benches/decomposing_normalizer_nfkd.rs | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/normalizer/benches/canonical_decomposition.rs b/components/normalizer/benches/canonical_decomposition.rs index 4167bd6f9dc..8e5ad5dc5e8 100644 --- a/components/normalizer/benches/canonical_decomposition.rs +++ b/components/normalizer/benches/canonical_decomposition.rs @@ -107,10 +107,10 @@ fn normalizer_bench_data() -> [BenchDataContent; 15] { ] .map(|(file_name, raw_content)| BenchDataContent { file_name: file_name.to_owned(), - nfc: nfc_normalizer.normalize(raw_content), - nfd: nfd_normalizer.normalize(raw_content), - nfkc: nfkc_normalizer.normalize(raw_content), - nfkd: nfkd_normalizer.normalize(raw_content), + nfc: nfc_normalizer.normalize(raw_content).to_string(), + nfd: nfd_normalizer.normalize(raw_content).to_string(), + nfkc: nfkc_normalizer.normalize(raw_content).to_string(), + nfkd: nfkd_normalizer.normalize(raw_content).to_string(), }) } diff --git a/components/normalizer/benches/composing_normalizer_nfc.rs b/components/normalizer/benches/composing_normalizer_nfc.rs index 10cc8f2fd6f..e23848dcc76 100644 --- a/components/normalizer/benches/composing_normalizer_nfc.rs +++ b/components/normalizer/benches/composing_normalizer_nfc.rs @@ -115,10 +115,10 @@ fn normalizer_bench_data() -> [BenchDataContent; 15] { let nfkd = &nfkd_normalizer.normalize(raw_content); BenchDataContent { file_name: file_name.to_owned(), - nfc: nfc.to_owned(), - nfd: nfd.to_owned(), - nfkc: nfkc.to_owned(), - nfkd: nfkd.to_owned(), + nfc: nfc.to_string(), + nfd: nfd.to_string(), + nfkc: nfkc.to_string(), + nfkd: nfkd.to_string(), nfc_u16: nfc.encode_utf16().collect(), nfd_u16: nfd.encode_utf16().collect(), nfkc_u16: nfkc.encode_utf16().collect(), diff --git a/components/normalizer/benches/composing_normalizer_nfkc.rs b/components/normalizer/benches/composing_normalizer_nfkc.rs index 4b0fcfe5a57..6792c7ee436 100644 --- a/components/normalizer/benches/composing_normalizer_nfkc.rs +++ b/components/normalizer/benches/composing_normalizer_nfkc.rs @@ -115,10 +115,10 @@ fn normalizer_bench_data() -> [BenchDataContent; 15] { let nfkd = &nfkd_normalizer.normalize(raw_content); BenchDataContent { file_name: file_name.to_owned(), - nfc: nfc.to_owned(), - nfd: nfd.to_owned(), - nfkc: nfkc.to_owned(), - nfkd: nfkd.to_owned(), + nfc: nfc.to_string(), + nfd: nfd.to_string(), + nfkc: nfkc.to_string(), + nfkd: nfkd.to_string(), nfc_u16: nfc.encode_utf16().collect(), nfd_u16: nfd.encode_utf16().collect(), nfkc_u16: nfkc.encode_utf16().collect(), diff --git a/components/normalizer/benches/decomposing_normalizer_nfd.rs b/components/normalizer/benches/decomposing_normalizer_nfd.rs index 712a3ecc050..4ee7590adb6 100644 --- a/components/normalizer/benches/decomposing_normalizer_nfd.rs +++ b/components/normalizer/benches/decomposing_normalizer_nfd.rs @@ -115,10 +115,10 @@ fn normalizer_bench_data() -> [BenchDataContent; 15] { let nfkd = &nfkd_normalizer.normalize(raw_content); BenchDataContent { file_name: file_name.to_owned(), - nfc: nfc.to_owned(), - nfd: nfd.to_owned(), - nfkc: nfkc.to_owned(), - nfkd: nfkd.to_owned(), + nfc: nfc.to_string(), + nfd: nfd.to_string(), + nfkc: nfkc.to_string(), + nfkd: nfkd.to_string(), nfc_u16: nfc.encode_utf16().collect(), nfd_u16: nfd.encode_utf16().collect(), nfkc_u16: nfkc.encode_utf16().collect(), diff --git a/components/normalizer/benches/decomposing_normalizer_nfkd.rs b/components/normalizer/benches/decomposing_normalizer_nfkd.rs index 16c5e19e4ff..4b5d9013546 100644 --- a/components/normalizer/benches/decomposing_normalizer_nfkd.rs +++ b/components/normalizer/benches/decomposing_normalizer_nfkd.rs @@ -115,10 +115,10 @@ fn normalizer_bench_data() -> [BenchDataContent; 15] { let nfkd = &nfkd_normalizer.normalize(raw_content); BenchDataContent { file_name: file_name.to_owned(), - nfc: nfc.to_owned(), - nfd: nfd.to_owned(), - nfkc: nfkc.to_owned(), - nfkd: nfkd.to_owned(), + nfc: nfc.to_string(), + nfd: nfd.to_string(), + nfkc: nfkc.to_string(), + nfkd: nfkd.to_string(), nfc_u16: nfc.encode_utf16().collect(), nfd_u16: nfd.encode_utf16().collect(), nfkc_u16: nfkc.encode_utf16().collect(),