Skip to content

Commit 64d522e

Browse files
author
Paolo Tranquilli
committed
Rust: address review
1 parent 2007157 commit 64d522e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rust/extractor/src/rust_analyzer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub struct ParseResult<'a> {
4141
pub errors: Vec<SyntaxError>,
4242
pub semantics_info: Result<FileSemanticInformation<'a>, &'a str>,
4343
}
44+
4445
impl<'a> RustAnalyzer<'a> {
4546
pub fn load_workspace(
4647
project: &ProjectManifest,
@@ -100,8 +101,10 @@ impl<'a> RustAnalyzer<'a> {
100101
file_id,
101102
path.to_string_lossy()
102103
);
104+
no_semantics_reason = "no text available for the file in the project";
105+
} else {
106+
no_semantics_reason = "file not found in project";
103107
}
104-
no_semantics_reason = "file not found in project";
105108
}
106109
RustAnalyzer::WithoutSemantics { reason } => {
107110
no_semantics_reason = reason;

0 commit comments

Comments
 (0)