Skip to content

Commit a360324

Browse files
committed
ci: fix linting + formatting
1 parent 0f8013f commit a360324

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

src/state.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use std::{
55
};
66
use tracing::info;
77

8-
use async_lsp::lsp_types::{DocumentSymbol, ProgressParamsValue};
98
use async_lsp::lsp_types::{
109
CompletionItem, CompletionItemKind, Location, OneOf, PublishDiagnosticsParams, Url,
1110
WorkspaceSymbol,
1211
};
12+
use async_lsp::lsp_types::{DocumentSymbol, ProgressParamsValue};
1313
use std::sync::mpsc::Sender;
1414
use tree_sitter::Node;
1515
use walkdir::WalkDir;
@@ -84,7 +84,13 @@ impl ProtoLanguageState {
8484
let doc_symbols = tree.find_document_locations(content.as_bytes());
8585

8686
for doc_symbol in doc_symbols {
87-
self.collect_workspace_symbols(&doc_symbol, &tree.uri, query, None, &mut symbols);
87+
Self::find_workspace_symbols_impl(
88+
&doc_symbol,
89+
&tree.uri,
90+
query,
91+
None,
92+
&mut symbols,
93+
);
8894
}
8995
}
9096

@@ -106,8 +112,7 @@ impl ProtoLanguageState {
106112
symbols
107113
}
108114

109-
fn collect_workspace_symbols(
110-
&self,
115+
fn find_workspace_symbols_impl(
111116
doc_symbol: &DocumentSymbol,
112117
uri: &Url,
113118
query: &str,
@@ -132,7 +137,7 @@ impl ProtoLanguageState {
132137

133138
if let Some(children) = &doc_symbol.children {
134139
for child in children {
135-
self.collect_workspace_symbols(
140+
Self::find_workspace_symbols_impl(
136141
child,
137142
uri,
138143
query,

src/workspace/definition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod test {
6060
use crate::context::jumpable::Jumpable;
6161
use std::path::PathBuf;
6262

63-
use insta::{assert_yaml_snapshot};
63+
use insta::assert_yaml_snapshot;
6464

6565
use crate::config::Config;
6666
use crate::state::ProtoLanguageState;

src/workspace/workspace_symbol.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ mod test {
4848
.contains(&cdir)
4949
);
5050
format!(
51-
"file://{}/src/workspace/input/{}",
52-
"<redacted>",
51+
"file://<redacted>/src/workspace/input/{}",
5352
c.as_str().unwrap().split('/').last().unwrap()
5453
)
5554

@@ -65,8 +64,7 @@ mod test {
6564
.contains(&cdir)
6665
);
6766
format!(
68-
"file://{}/src/workspace/input/{}",
69-
"<redacted>",
67+
"file://<redacted>/src/workspace/input/{}",
7068
c.as_str().unwrap().split('/').last().unwrap()
7169
)
7270
})});
@@ -80,8 +78,7 @@ mod test {
8078
.contains(&current_dir.to_str().unwrap())
8179
);
8280
format!(
83-
"file://{}/src/workspace/input/{}",
84-
"<redacted>",
81+
"file://<redacted>/src/workspace/input/{}",
8582
c.as_str().unwrap().split('/').last().unwrap()
8683
)
8784
})});

0 commit comments

Comments
 (0)