diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea0c50541..c6743f867 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.67.0 + - uses: dtolnay/rust-toolchain@1.70.0 - uses: Swatinem/rust-cache@v2 - run: cargo check --workspace diff --git a/Cargo.toml b/Cargo.toml index 3950687b5..c0833d965 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["cli"] [workspace.package] version = "0.4.0" -rust-version = "1.67" +rust-version = "1.70" # also change in ci.yml authors = ["The Typst Project Developers"] edition = "2021" homepage = "https://typst.app" diff --git a/cli/src/main.rs b/cli/src/main.rs index d0cf6139e..9756c168b 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -18,9 +18,9 @@ use comemo::Prehashed; use elsa::FrozenVec; use memmap2::Mmap; use notify::{RecommendedWatcher, RecursiveMode, Watcher}; -use once_cell::unsync::OnceCell; use same_file::{is_same_file, Handle}; use siphasher::sip128::{Hasher128, SipHasher13}; +use std::cell::OnceCell; use termcolor::{ColorChoice, StandardStream, WriteColor}; use typst::diag::{FileError, FileResult, SourceError, StrResult}; use typst::doc::Document; diff --git a/src/eval/library.rs b/src/eval/library.rs index 0067bf571..4978ada20 100644 --- a/src/eval/library.rs +++ b/src/eval/library.rs @@ -4,7 +4,7 @@ use std::num::NonZeroUsize; use comemo::Tracked; use ecow::EcoString; -use once_cell::sync::OnceCell; +use std::sync::OnceLock; use super::{Args, Dynamic, Module, Value, Vm}; use crate::diag::SourceResult; @@ -158,7 +158,7 @@ impl Hash for LangItems { /// Global storage for lang items. #[doc(hidden)] -pub static LANG_ITEMS: OnceCell = OnceCell::new(); +pub static LANG_ITEMS: OnceLock = OnceLock::new(); /// Set the lang items. /// diff --git a/tests/src/tests.rs b/tests/src/tests.rs index bf3d19c1f..debb3c921 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -13,9 +13,9 @@ use std::{env, io}; use clap::Parser; use comemo::{Prehashed, Track}; use elsa::FrozenVec; -use once_cell::unsync::OnceCell; use oxipng::{InFile, Options, OutFile}; use rayon::iter::{ParallelBridge, ParallelIterator}; +use std::cell::OnceCell; use tiny_skia as sk; use unscanny::Scanner; use walkdir::WalkDir;