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