diff options
| author | Abdul-Rahman Sibahi <asibahi@users.noreply.github.com> | 2024-10-31 14:52:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 11:52:11 +0000 |
| commit | b969c01b282287b44c3e131f8c0c53dcbb304e30 (patch) | |
| tree | fe58484bfa76e7fe7a35bf0bffdc339b24621693 /tests/src/collect.rs | |
| parent | 644ed252dda1a0785d2bee577a89322416f4d950 (diff) | |
Replace `once_cell`'s `Lazy` as much as possible (#4617)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/src/collect.rs')
| -rw-r--r-- | tests/src/collect.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/src/collect.rs b/tests/src/collect.rs index cc3ff736..80e5e5a8 100644 --- a/tests/src/collect.rs +++ b/tests/src/collect.rs @@ -3,9 +3,9 @@ use std::fmt::{self, Display, Formatter}; use std::ops::Range; use std::path::{Path, PathBuf}; use std::str::FromStr; +use std::sync::LazyLock; use ecow::{eco_format, EcoString}; -use once_cell::sync::Lazy; use typst::syntax::package::PackageVersion; use typst::syntax::{is_id_continue, is_ident, is_newline, FileId, Source, VirtualPath}; use unscanny::Scanner; @@ -390,7 +390,7 @@ impl<'a> Parser<'a> { /// Whether a test is within the selected set to run. fn selected(name: &str, abs: PathBuf) -> bool { - static SKIPPED: Lazy<HashSet<&'static str>> = Lazy::new(|| { + static SKIPPED: LazyLock<HashSet<&'static str>> = LazyLock::new(|| { String::leak(std::fs::read_to_string(crate::SKIP_PATH).unwrap()) .lines() .map(|line| line.trim()) |
