File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl<'a> RustAnalyzer<'a> {
73
73
RustAnalyzer :: WithSemantics { vfs, semantics }
74
74
}
75
75
pub fn parse ( & self , path : & Path ) -> ParseResult {
76
- let mut no_semantics_reason = "" ;
76
+ let no_semantics_reason;
77
77
match self {
78
78
RustAnalyzer :: WithSemantics { vfs, semantics } => {
79
79
if let Some ( file_id) = path_to_file_id ( path, vfs) {
@@ -94,15 +94,14 @@ impl<'a> RustAnalyzer<'a> {
94
94
errors,
95
95
semantics_info : Ok ( FileSemanticInformation { file_id, semantics } ) ,
96
96
} ;
97
- } else {
98
- debug ! (
99
- "No text available for file_id '{:?}', falling back to loading file '{}' from disk." ,
100
- file_id,
101
- path. to_string_lossy( )
102
- ) ;
103
- no_semantics_reason = "file not found in project" ;
104
97
}
98
+ debug ! (
99
+ "No text available for file_id '{:?}', falling back to loading file '{}' from disk." ,
100
+ file_id,
101
+ path. to_string_lossy( )
102
+ ) ;
105
103
}
104
+ no_semantics_reason = "file not found in project" ;
106
105
}
107
106
RustAnalyzer :: WithoutSemantics { reason } => {
108
107
no_semantics_reason = reason;
You can’t perform that action at this time.
0 commit comments