refactor: Replace once_cell to std lib (#1402)

This commit is contained in:
Yang Hau 2023-06-07 07:42:58 -05:00 committed by GitHub
parent 3d3ea9016f
commit 0dc1776202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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"

View File

@ -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;

View File

@ -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<LangItems> = OnceCell::new();
pub static LANG_ITEMS: OnceLock<LangItems> = OnceLock::new();
/// Set the lang items.
///

View File

@ -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;