mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
refactor: Replace once_cell to std lib (#1402)
This commit is contained in:
parent
3d3ea9016f
commit
0dc1776202
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
///
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user