File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ mod tests {
89
89
90
90
#[ test]
91
91
fn test_goto_definition ( ) {
92
- // Reset the indexer on exit
93
- let _guard = indexer:: IndexerGuard ;
92
+ let _guard = indexer:: ResetIndexerGuard ;
94
93
95
94
let code = r#"
96
95
foo <- 42
@@ -131,8 +130,7 @@ print(foo)
131
130
132
131
#[ test]
133
132
fn test_goto_definition_comment_section ( ) {
134
- // Reset the indexer on exit
135
- let _guard = indexer:: IndexerGuard ;
133
+ let _guard = indexer:: ResetIndexerGuard ;
136
134
137
135
let code = r#"
138
136
# foo ----
Original file line number Diff line number Diff line change @@ -167,10 +167,10 @@ pub(crate) fn indexer_clear() {
167
167
/// RAII guard that clears `WORKSPACE_INDEX` when dropped.
168
168
/// Useful for ensuring a clean index state in tests.
169
169
#[ cfg( test) ]
170
- pub ( crate ) struct IndexerGuard ;
170
+ pub ( crate ) struct ResetIndexerGuard ;
171
171
172
172
#[ cfg( test) ]
173
- impl Drop for IndexerGuard {
173
+ impl Drop for ResetIndexerGuard {
174
174
fn drop ( & mut self ) {
175
175
indexer_clear ( ) ;
176
176
}
Original file line number Diff line number Diff line change @@ -586,7 +586,7 @@ mod tests {
586
586
use crate :: lsp:: config:: LspConfig ;
587
587
use crate :: lsp:: config:: WorkspaceSymbolsConfig ;
588
588
use crate :: lsp:: documents:: Document ;
589
- use crate :: lsp:: indexer:: IndexerGuard ;
589
+ use crate :: lsp:: indexer:: ResetIndexerGuard ;
590
590
591
591
fn test_symbol ( code : & str ) -> Vec < DocumentSymbol > {
592
592
let doc = Document :: new ( code, None ) ;
@@ -901,7 +901,7 @@ a <- function() {
901
901
#[ test]
902
902
fn test_workspace_symbols_include_comment_sections ( ) {
903
903
fn run ( include_comment_sections : bool ) -> Vec < String > {
904
- let _guard = IndexerGuard ;
904
+ let _guard = ResetIndexerGuard ;
905
905
906
906
let code = "# Section ----\n foo <- 1" ;
907
907
You can’t perform that action at this time.
0 commit comments