diff --git a/crates/tinymist-analysis/Cargo.toml b/crates/tinymist-analysis/Cargo.toml index 9704507f..c4e5b1bb 100644 --- a/crates/tinymist-analysis/Cargo.toml +++ b/crates/tinymist-analysis/Cargo.toml @@ -3,7 +3,6 @@ name = "tinymist-analysis" description = "Typst Static Analyzers for Tinymist." categories = ["compilers"] keywords = ["language", "typst"] -# group: world version.workspace = true authors.workspace = true license.workspace = true diff --git a/crates/tinymist-derive/Cargo.toml b/crates/tinymist-derive/Cargo.toml index 667d757c..9e1026e1 100644 --- a/crates/tinymist-derive/Cargo.toml +++ b/crates/tinymist-derive/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["typst"] version = "0.13.16" authors.workspace = true license.workspace = true -edition.workspace = true +edition = "2024" homepage.workspace = true repository.workspace = true rust-version.workspace = true diff --git a/crates/tinymist-derive/src/lib.rs b/crates/tinymist-derive/src/lib.rs index fac13f12..9ea7d8f7 100644 --- a/crates/tinymist-derive/src/lib.rs +++ b/crates/tinymist-derive/src/lib.rs @@ -2,7 +2,7 @@ extern crate proc_macro; use proc_macro::TokenStream; use quote::quote; -use syn::{parse_macro_input, DeriveInput}; +use syn::{DeriveInput, parse_macro_input}; #[proc_macro_derive(BindTyCtx, attributes(bind))] pub fn bind_ty_ctx(input: TokenStream) -> TokenStream { diff --git a/crates/tinymist-l10n/Cargo.toml b/crates/tinymist-l10n/Cargo.toml index dd6595aa..669dd957 100644 --- a/crates/tinymist-l10n/Cargo.toml +++ b/crates/tinymist-l10n/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["language", "typst"] version = "0.13.16" authors.workspace = true license.workspace = true -edition.workspace = true +edition = "2024" homepage.workspace = true repository.workspace = true rust-version.workspace = true diff --git a/crates/tinymist-package/Cargo.toml b/crates/tinymist-package/Cargo.toml index 3a05f8ed..8d55f9c1 100644 --- a/crates/tinymist-package/Cargo.toml +++ b/crates/tinymist-package/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["api", "language", "typst"] version = "0.13.16" authors.workspace = true license.workspace = true -edition.workspace = true +edition = "2024" homepage.workspace = true repository.workspace = true rust-version.workspace = true diff --git a/crates/tinymist-package/src/pack.rs b/crates/tinymist-package/src/pack.rs index 498218dc..b75273f0 100644 --- a/crates/tinymist-package/src/pack.rs +++ b/crates/tinymist-package/src/pack.rs @@ -6,7 +6,7 @@ use std::io::{self, Read}; use std::path::Path; use std::sync::Arc; -use ecow::{eco_format, EcoVec}; +use ecow::{EcoVec, eco_format}; use tinymist_std::{ImmutBytes, ImmutPath}; use typst::diag::{PackageError, PackageResult}; use typst::syntax::package::{PackageSpec, VersionlessPackageSpec}; diff --git a/crates/tinymist-package/src/pack/http.rs b/crates/tinymist-package/src/pack/http.rs index ae8d7577..ea580e02 100644 --- a/crates/tinymist-package/src/pack/http.rs +++ b/crates/tinymist-package/src/pack/http.rs @@ -37,7 +37,7 @@ impl> PackFs for HttpPack { let reader = match resp.and_then(|r| r.error_for_status()) { Ok(response) => response, Err(err) if matches!(err.status().map(|s| s.as_u16()), Some(404)) => { - return Err(PackageError::NotFound(spec.clone())) + return Err(PackageError::NotFound(spec.clone())); } Err(err) => return Err(PackageError::NetworkFailed(Some(eco_format!("{err}")))), }; diff --git a/crates/tinymist-package/src/registry/browser.rs b/crates/tinymist-package/src/registry/browser.rs index 9b181c23..f427aeb3 100644 --- a/crates/tinymist-package/src/registry/browser.rs +++ b/crates/tinymist-package/src/registry/browser.rs @@ -3,8 +3,8 @@ use std::{io::Read, path::Path}; use js_sys::Uint8Array; -use typst::diag::{eco_format, EcoString}; -use wasm_bindgen::{prelude::*, JsValue}; +use typst::diag::{EcoString, eco_format}; +use wasm_bindgen::{JsValue, prelude::*}; use super::{PackageError, PackageRegistry, PackageSpec}; diff --git a/crates/tinymist-package/src/registry/http.rs b/crates/tinymist-package/src/registry/http.rs index 7d8bc1de..4eddd652 100644 --- a/crates/tinymist-package/src/registry/http.rs +++ b/crates/tinymist-package/src/registry/http.rs @@ -4,14 +4,14 @@ use std::path::Path; use std::sync::{Arc, OnceLock}; use parking_lot::Mutex; -use reqwest::blocking::Response; use reqwest::Certificate; +use reqwest::blocking::Response; use tinymist_std::ImmutPath; -use typst::diag::{eco_format, EcoString, PackageResult, StrResult}; +use typst::diag::{EcoString, PackageResult, StrResult, eco_format}; use typst::syntax::package::{PackageVersion, VersionlessPackageSpec}; use super::{ - DummyNotifier, Notifier, PackageError, PackageRegistry, PackageSpec, DEFAULT_REGISTRY, + DEFAULT_REGISTRY, DummyNotifier, Notifier, PackageError, PackageRegistry, PackageSpec, }; /// The http package registry for typst.ts. @@ -289,7 +289,7 @@ impl PackageStorage { let reader = match resp.and_then(|r| r.error_for_status()) { Ok(response) => response, Err(err) if matches!(err.status().map(|s| s.as_u16()), Some(404)) => { - return Err(PackageError::NotFound(spec.clone())) + return Err(PackageError::NotFound(spec.clone())); } Err(err) => return Err(PackageError::NetworkFailed(Some(eco_format!("{err}")))), }; diff --git a/crates/tinymist-std/Cargo.toml b/crates/tinymist-std/Cargo.toml index 727555e6..b3dc1e18 100644 --- a/crates/tinymist-std/Cargo.toml +++ b/crates/tinymist-std/Cargo.toml @@ -5,7 +5,7 @@ description = "Additional functions wrapping Rust's standard library." version = "0.13.16" authors.workspace = true license.workspace = true -edition.workspace = true +edition = "2024" homepage.workspace = true repository.workspace = true diff --git a/crates/tinymist-std/src/concepts/typst.rs b/crates/tinymist-std/src/concepts/typst.rs index fcfdae66..b33af467 100644 --- a/crates/tinymist-std/src/concepts/typst.rs +++ b/crates/tinymist-std/src/concepts/typst.rs @@ -108,5 +108,5 @@ pub use well_known::*; /// The prelude of the Typst module. pub mod prelude { pub use comemo::Prehashed; - pub use ecow::{eco_format, eco_vec, EcoString, EcoVec}; + pub use ecow::{EcoString, EcoVec, eco_format, eco_vec}; } diff --git a/crates/tinymist-std/src/error.rs b/crates/tinymist-std/src/error.rs index 1e8c1008..fb9eeb32 100644 --- a/crates/tinymist-std/src/error.rs +++ b/crates/tinymist-std/src/error.rs @@ -403,7 +403,7 @@ pub mod prelude { use crate::Error; pub use super::{IgnoreLogging, WithContext, WithContextUntyped}; - pub use crate::{bail, Result}; + pub use crate::{Result, bail}; pub fn map_string_err(loc: &'static str) -> impl Fn(T) -> Error { move |e| Error::new(loc, e.to_string().to_error_kind(), None) diff --git a/crates/tinymist-std/src/fs/flock.rs b/crates/tinymist-std/src/fs/flock.rs index 3f266aad..61093c48 100644 --- a/crates/tinymist-std/src/fs/flock.rs +++ b/crates/tinymist-std/src/fs/flock.rs @@ -503,7 +503,7 @@ mod sys { use windows_sys::Win32::Foundation::HANDLE; use windows_sys::Win32::Foundation::{ERROR_INVALID_FUNCTION, ERROR_LOCK_VIOLATION}; use windows_sys::Win32::Storage::FileSystem::{ - LockFileEx, UnlockFile, LOCKFILE_EXCLUSIVE_LOCK, LOCKFILE_FAIL_IMMEDIATELY, + LOCKFILE_EXCLUSIVE_LOCK, LOCKFILE_FAIL_IMMEDIATELY, LockFileEx, UnlockFile, }; pub(super) fn lock_shared(file: &File) -> Result<()> { diff --git a/crates/tinymist-std/src/fs/paths.rs b/crates/tinymist-std/src/fs/paths.rs index 0c43b6af..9e6f7f7f 100644 --- a/crates/tinymist-std/src/fs/paths.rs +++ b/crates/tinymist-std/src/fs/paths.rs @@ -723,7 +723,7 @@ fn exclude_from_content_indexing(path: &Path) { use std::iter::once; use std::os::windows::prelude::OsStrExt; use windows_sys::Win32::Storage::FileSystem::{ - GetFileAttributesW, SetFileAttributesW, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, GetFileAttributesW, SetFileAttributesW, }; let path: Vec = path.as_os_str().encode_wide().chain(once(0)).collect(); diff --git a/crates/tinymist-std/src/path.rs b/crates/tinymist-std/src/path.rs index fff13c2c..81d5857d 100644 --- a/crates/tinymist-std/src/path.rs +++ b/crates/tinymist-std/src/path.rs @@ -71,7 +71,7 @@ pub fn diff(path: &Path, base: &Path) -> Option { mod test { use std::path::{Path, PathBuf}; - use super::{clean as inner_path_clean, unix_slash, PathClean}; + use super::{PathClean, clean as inner_path_clean, unix_slash}; pub fn clean>(path: P) -> String { unix_slash(&inner_path_clean(path)) diff --git a/crates/typst-shim/Cargo.toml b/crates/typst-shim/Cargo.toml index b8ad7147..02fe8d9e 100644 --- a/crates/typst-shim/Cargo.toml +++ b/crates/typst-shim/Cargo.toml @@ -2,8 +2,9 @@ name = "typst-shim" description = "A compatibility layer for Typst release and mainline versions." authors = ["The Typst Project Developers"] +# group: world version = "0.13.16" -edition.workspace = true +edition = "2024" license.workspace = true homepage.workspace = true repository.workspace = true diff --git a/crates/typst-shim/src/nightly/eval.rs b/crates/typst-shim/src/nightly/eval.rs index 37349504..70d60324 100644 --- a/crates/typst-shim/src/nightly/eval.rs +++ b/crates/typst-shim/src/nightly/eval.rs @@ -1,12 +1,12 @@ //! Typst Evaluation use comemo::Track; +use typst::World; use typst::diag::SourceResult; use typst::engine::{Engine, Route, Sink, Traced}; use typst::foundations::{Context, Func, Module, Value}; use typst::introspection::Introspector; use typst::syntax::Source; -use typst::World; pub use typst_eval::*; diff --git a/crates/typst-shim/src/stable/eval.rs b/crates/typst-shim/src/stable/eval.rs index 37349504..70d60324 100644 --- a/crates/typst-shim/src/stable/eval.rs +++ b/crates/typst-shim/src/stable/eval.rs @@ -1,12 +1,12 @@ //! Typst Evaluation use comemo::Track; +use typst::World; use typst::diag::SourceResult; use typst::engine::{Engine, Route, Sink, Traced}; use typst::foundations::{Context, Func, Module, Value}; use typst::introspection::Introspector; use typst::syntax::Source; -use typst::World; pub use typst_eval::*;