mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
fix: compile warnings and errors (#619)
This commit is contained in:
parent
58ff9ab846
commit
3e58f97866
2 changed files with 4 additions and 16 deletions
|
@ -243,19 +243,18 @@ struct ScanSymbolCtx<'a> {
|
|||
for_spec: Option<&'a PackageSpec>,
|
||||
aliases: &'a mut HashMap<FileId, Vec<String>>,
|
||||
extras: &'a mut Vec<SymbolInfo>,
|
||||
route: Route<'a>,
|
||||
root: FileId,
|
||||
tracer: Tracer,
|
||||
}
|
||||
|
||||
impl ScanSymbolCtx<'_> {
|
||||
fn module(&mut self, fid: FileId) -> StrResult<Module> {
|
||||
let source = self.world.source(fid).map_err(|e| eco_format!("{e}"))?;
|
||||
let route = self.route.track();
|
||||
let tracer = self.tracer.track_mut();
|
||||
let route = Route::default();
|
||||
let mut tracer = Tracer::default();
|
||||
let w: &dyn typst::World = self.world;
|
||||
|
||||
typst::eval::eval(w.track(), route, tracer, &source).map_err(|e| eco_format!("{e:?}"))
|
||||
typst::eval::eval(w.track(), route.track(), tracer.track_mut(), &source)
|
||||
.map_err(|e| eco_format!("{e:?}"))
|
||||
}
|
||||
|
||||
fn module_sym(&mut self, path: EcoVec<&str>, module: Module) -> SymbolInfo {
|
||||
|
@ -361,8 +360,6 @@ pub fn list_symbols(world: &LspWorld, spec: &PackageInfo) -> StrResult<SymbolsIn
|
|||
for_spec: Some(&for_spec),
|
||||
aliases: &mut aliases,
|
||||
extras: &mut extras,
|
||||
route: Route::default(),
|
||||
tracer: Tracer::default(),
|
||||
};
|
||||
|
||||
let src = scan_ctx.module(entry_point)?;
|
||||
|
|
|
@ -361,15 +361,6 @@ impl<F: CompilerFeat + Send + Sync + 'static> CompileServerActor<F> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create a new compiler actor.
|
||||
pub fn new(
|
||||
verse: CompilerUniverse<F>,
|
||||
intr_tx: mpsc::UnboundedSender<Interrupt<F>>,
|
||||
intr_rx: mpsc::UnboundedReceiver<Interrupt<F>>,
|
||||
) -> Self {
|
||||
Self::new_with(verse, intr_tx, intr_rx, CompileServerOpts::default())
|
||||
}
|
||||
|
||||
pub fn with_watch(mut self, watch: bool) -> Self {
|
||||
self.enable_watch = watch;
|
||||
self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue