diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /vendor/icu_locid/benches/iai_langid.rs | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/icu_locid/benches/iai_langid.rs')
-rw-r--r-- | vendor/icu_locid/benches/iai_langid.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/icu_locid/benches/iai_langid.rs b/vendor/icu_locid/benches/iai_langid.rs index f964d1462..bf3b911cf 100644 --- a/vendor/icu_locid/benches/iai_langid.rs +++ b/vendor/icu_locid/benches/iai_langid.rs @@ -5,6 +5,7 @@ use icu_locid::{ langid, subtags_language as language, subtags_region as region, LanguageIdentifier, }; +use writeable::Writeable; const LIDS: &[LanguageIdentifier] = &[ langid!("en"), @@ -97,6 +98,12 @@ fn bench_langid_serialize() { let _: Vec<String> = LIDS.iter().map(|l| l.to_string()).collect(); } +fn bench_langid_serialize_writeable() { + // Tests serialization of LIDs. + + let _: Vec<_> = LIDS.iter().map(|l| l.write_to_string()).collect(); +} + fn bench_langid_canonicalize() { // Tests canonicalization of strings. @@ -114,5 +121,6 @@ iai::main!( bench_langid_matching, bench_langid_matching_str, bench_langid_serialize, + bench_langid_serialize_writeable, bench_langid_canonicalize, ); |