mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
refactor: remove once_cell
use from tinymist (#1632)
* refactor: remove `once_cell` use from tinymist * feat: remove more
This commit is contained in:
parent
769fc93df9
commit
72e33e461d
20 changed files with 68 additions and 82 deletions
|
@ -19,7 +19,6 @@ comemo.workspace = true
|
|||
|
||||
reflexo-vec2svg.workspace = true
|
||||
reflexo-typst.workspace = true
|
||||
once_cell.workspace = true
|
||||
tokio.workspace = true
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
|
|
|
@ -10,10 +10,10 @@ pub use actor::editor::{
|
|||
pub use args::*;
|
||||
pub use outline::Outline;
|
||||
|
||||
use std::sync::OnceLock;
|
||||
use std::{collections::HashMap, future::Future, path::PathBuf, pin::Pin, sync::Arc};
|
||||
|
||||
use futures::sink::SinkExt;
|
||||
use once_cell::sync::OnceCell;
|
||||
use reflexo_typst::debug_loc::{DocumentPosition, SourceSpanOffset};
|
||||
use reflexo_typst::Error;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -197,7 +197,7 @@ pub struct PreviewBuilder {
|
|||
webview_conn: BroadcastChannel<WebviewActorRequest>,
|
||||
doc_sender: Arc<parking_lot::RwLock<Option<Arc<dyn CompileView>>>>,
|
||||
|
||||
compile_watcher: OnceCell<Arc<CompileWatcher>>,
|
||||
compile_watcher: OnceLock<Arc<CompileWatcher>>,
|
||||
}
|
||||
|
||||
impl PreviewBuilder {
|
||||
|
@ -209,7 +209,7 @@ impl PreviewBuilder {
|
|||
editor_conn: mpsc::unbounded_channel(),
|
||||
webview_conn: broadcast::channel(32),
|
||||
doc_sender: Arc::new(parking_lot::RwLock::new(None)),
|
||||
compile_watcher: OnceCell::new(),
|
||||
compile_watcher: OnceLock::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue