mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-20 03:49:45 +00:00
fix: misleading vars
This commit is contained in:
parent
7b8c44ef4c
commit
e37f3a891c
1 changed files with 10 additions and 13 deletions
|
|
@ -882,19 +882,16 @@ impl<F: CompilerFeat, Ext: 'static> ProjectInsState<F, Ext> {
|
|||
move || {
|
||||
let compiled = if syntax_only {
|
||||
let main = graph.snap.world.main();
|
||||
let syntax_error = graph
|
||||
.world()
|
||||
.source(main)
|
||||
.at(Span::from_range(main, 0..0))
|
||||
.and_then(|source| {
|
||||
let errors = source.root().errors();
|
||||
if errors.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(errors.into_iter().map(|s| s.into()).collect())
|
||||
}
|
||||
});
|
||||
let diag = Arc::new(DiagnosticsTask::from_errors(syntax_error.err()));
|
||||
let source_res = graph.world().source(main).at(Span::from_range(main, 0..0));
|
||||
let syntax_res = source_res.and_then(|source| {
|
||||
let errors = source.root().errors();
|
||||
if errors.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(errors.into_iter().map(|s| s.into()).collect())
|
||||
}
|
||||
});
|
||||
let diag = Arc::new(DiagnosticsTask::from_errors(syntax_res.err()));
|
||||
|
||||
CompiledArtifact {
|
||||
diag,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue