summaryrefslogtreecommitdiff
path: root/crates/typst-cli/src/main.rs
diff options
context:
space:
mode:
authorAbdul-Rahman Sibahi <asibahi@users.noreply.github.com>2024-10-31 14:52:11 +0300
committerGitHub <noreply@github.com>2024-10-31 11:52:11 +0000
commitb969c01b282287b44c3e131f8c0c53dcbb304e30 (patch)
treefe58484bfa76e7fe7a35bf0bffdc339b24621693 /crates/typst-cli/src/main.rs
parent644ed252dda1a0785d2bee577a89322416f4d950 (diff)
Replace `once_cell`'s `Lazy` as much as possible (#4617)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates/typst-cli/src/main.rs')
-rw-r--r--crates/typst-cli/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-cli/src/main.rs b/crates/typst-cli/src/main.rs
index 464ad624..631befe5 100644
--- a/crates/typst-cli/src/main.rs
+++ b/crates/typst-cli/src/main.rs
@@ -16,12 +16,12 @@ mod world;
use std::cell::Cell;
use std::io::{self, Write};
use std::process::ExitCode;
+use std::sync::LazyLock;
use clap::error::ErrorKind;
use clap::Parser;
use codespan_reporting::term;
use codespan_reporting::term::termcolor::WriteColor;
-use once_cell::sync::Lazy;
use typst::diag::HintedStrResult;
use crate::args::{CliArguments, Command};
@@ -33,7 +33,7 @@ thread_local! {
}
/// The parsed command line arguments.
-static ARGS: Lazy<CliArguments> = Lazy::new(|| {
+static ARGS: LazyLock<CliArguments> = LazyLock::new(|| {
CliArguments::try_parse().unwrap_or_else(|error| {
if error.kind() == ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand {
crate::greet::greet();