diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /vendor/ucd-trie/benches | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/ucd-trie/benches')
-rw-r--r-- | vendor/ucd-trie/benches/bench.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vendor/ucd-trie/benches/bench.rs b/vendor/ucd-trie/benches/bench.rs index 53c04b9d0..edbbefbaf 100644 --- a/vendor/ucd-trie/benches/bench.rs +++ b/vendor/ucd-trie/benches/bench.rs @@ -1,21 +1,18 @@ #![feature(test)] -#[macro_use] -extern crate lazy_static; extern crate test; +use once_cell::sync::Lazy; use ucd_trie::TrieSetOwned; #[bench] fn bench_trie_set(b: &mut test::Bencher) { const CHARS: &'static [char] = &['a', 'β', '☃', '😼']; // const CHARS: &'static [char] = &['a']; - lazy_static! { - static ref SET: TrieSetOwned = - TrieSetOwned::from_scalars(CHARS).unwrap(); - } + static SET: Lazy<TrieSetOwned> = + Lazy::new(|| TrieSetOwned::from_scalars(CHARS).unwrap()); - let set = &*SET; + let set = Lazy::force(&SET); let mut i = 0; b.iter(|| { let c = CHARS[i]; |