diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Cargo.toml | 1 | ||||
| -rw-r--r-- | tests/src/collect.rs | 4 | ||||
| -rw-r--r-- | tests/src/tests.rs | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/tests/Cargo.toml b/tests/Cargo.toml index b2fedd75..b1855b49 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -22,7 +22,6 @@ typst-svg = { workspace = true } clap = { workspace = true } comemo = { workspace = true } ecow = { workspace = true } -once_cell = { workspace = true } oxipng = { workspace = true } parking_lot = { workspace = true } rayon = { workspace = true } 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()) diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 58bd7cf7..940c9e3c 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -8,10 +8,10 @@ mod run; mod world; use std::path::Path; +use std::sync::LazyLock; use std::time::Duration; use clap::Parser; -use once_cell::sync::Lazy; use parking_lot::Mutex; use rayon::iter::{ParallelBridge, ParallelIterator}; @@ -19,7 +19,7 @@ use crate::args::{CliArguments, Command}; use crate::logger::Logger; /// The parsed command line arguments. -static ARGS: Lazy<CliArguments> = Lazy::new(CliArguments::parse); +static ARGS: LazyLock<CliArguments> = LazyLock::new(CliArguments::parse); /// The directory where the test suite is located. const SUITE_PATH: &str = "tests/suite"; |
