feat: bump edition of most crates to rust 2024 (#2042)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run

This commit is contained in:
Myriad-Dreamin 2025-08-18 16:48:41 +08:00 committed by GitHub
parent d227ad2a53
commit 05280aec4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
128 changed files with 340 additions and 331 deletions

View file

@ -1,8 +1,8 @@
use std::path::Path;
use sync_ls::transport::MirrorArgs;
use tinymist::project::DocCommands;
use tinymist::LONG_VERSION;
use tinymist::project::DocCommands;
use tinymist::{CompileFontArgs, CompileOnceArgs};
#[cfg(feature = "preview")]

View file

@ -6,9 +6,9 @@ use reflexo::ImmutPath;
use reflexo_typst::WorldComputeGraph;
use tinymist_std::error::prelude::*;
use tinymist::ExportTask;
use tinymist::project::*;
use tinymist::world::system::print_diagnostics;
use tinymist::ExportTask;
/// Arguments for project compilation.
#[derive(Debug, Clone, clap::Parser)]

View file

@ -23,13 +23,13 @@ use futures::future::MaybeDone;
use parking_lot::Mutex;
use reflexo::ImmutPath;
use reflexo_typst::package::PackageSpec;
use sync_ls::transport::{with_stdio_transport, MirrorArgs};
use sync_ls::transport::{MirrorArgs, with_stdio_transport};
use sync_ls::{
internal_error, DapBuilder, DapMessage, GetMessageKind, LsHook, LspBuilder, LspClientRoot,
LspMessage, LspResult, Message, RequestId, TConnectionTx,
DapBuilder, DapMessage, GetMessageKind, LsHook, LspBuilder, LspClientRoot, LspMessage,
LspResult, Message, RequestId, TConnectionTx, internal_error,
};
use tinymist::world::TaskInputs;
use tinymist::LONG_VERSION;
use tinymist::world::TaskInputs;
use tinymist::{Config, RegularInit, ServerState, SuperInit, UserActionTask};
use tinymist_project::EntryResolver;
use tinymist_query::package::PackageInfo;

View file

@ -5,13 +5,13 @@ use hyper_tungstenite::tungstenite::Message;
use tinymist::{
project::ProjectPreviewState,
tool::{
preview::{bind_streams, make_http_server, PreviewCliArgs, ProjectPreviewHandler},
project::{start_project, ProjectOpts, StartProjectResult},
preview::{PreviewCliArgs, ProjectPreviewHandler, bind_streams, make_http_server},
project::{ProjectOpts, StartProjectResult, start_project},
},
};
use tinymist_assets::TYPST_PREVIEW_HTML;
use tinymist_preview::{
frontend_html, ControlPlaneMessage, ControlPlaneTx, PreviewBuilder, PreviewConfig,
ControlPlaneMessage, ControlPlaneTx, PreviewBuilder, PreviewConfig, frontend_html,
};
use tinymist_project::WorldProvider;
use tinymist_std::error::prelude::*;
@ -143,7 +143,9 @@ pub async fn preview_main(args: PreviewCliArgs) -> Result<()> {
let frontend_html = frontend_html(TYPST_PREVIEW_HTML, args.preview.preview_mode, "/");
let static_server = if let Some(static_file_host) = static_file_host {
log::warn!("--static-file-host is deprecated, which will be removed in the future. Use --data-plane-host instead.");
log::warn!(
"--static-file-host is deprecated, which will be removed in the future. Use --data-plane-host instead."
);
let html = frontend_html.clone();
Some(make_http_server(html, static_file_host, websocket_tx.clone()).await)
} else {

View file

@ -4,15 +4,15 @@ use core::fmt;
use std::collections::HashSet;
use std::io::Write;
use std::path::Path;
use std::sync::{atomic::AtomicBool, Arc};
use std::sync::{Arc, atomic::AtomicBool};
use itertools::Either;
use parking_lot::Mutex;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use reflexo::ImmutPath;
use reflexo_typst::{vfs::FileId, TypstDocument, TypstHtmlDocument};
use reflexo_typst::{TypstDocument, TypstHtmlDocument, vfs::FileId};
use tinymist_debug::CoverageResult;
use tinymist_project::world::{system::print_diagnostics, DiagnosticFormat};
use tinymist_project::world::{DiagnosticFormat, system::print_diagnostics};
use tinymist_query::analysis::Analysis;
use tinymist_query::syntax::{cast_include_expr, find_source_by_expr, node_ancestors};
use tinymist_query::testing::{TestCaseKind, TestSuites};
@ -20,13 +20,13 @@ use tinymist_std::{bail, error::prelude::*, fs::paths::write_atomic, typst::Typs
use typst::diag::{Severity, SourceDiagnostic};
use typst::ecow::EcoVec;
use typst::foundations::{Context, Label};
use typst::syntax::{ast, LinkedNode, Source, Span};
use typst::{utils::PicoStr, World};
use typst::syntax::{LinkedNode, Source, Span, ast};
use typst::{World, utils::PicoStr};
use typst_shim::eval::TypstEngine;
use tinymist::project::*;
use tinymist::tool::project::{start_project, StartProjectResult};
use tinymist::world::{with_main, SourceWorld};
use tinymist::tool::project::{StartProjectResult, start_project};
use tinymist::world::{SourceWorld, with_main};
use crate::utils::exit_on_ctrl_c;