Skip to content

Commit 059a238

Browse files
committed
fix: lint + formating
1 parent adf5dff commit 059a238

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/lsp.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,7 @@ impl LanguageServer for ProtoLanguageServer {
457457
// override config to disable protoc diagnostics during change
458458
let mut pconf = pconf.config.clone();
459459
pconf.experimental.use_protoc_diagnostics = false;
460-
if let Some(diagnostics) = self
461-
.state
462-
.upsert_file(&uri, content, &ipath, 8, &pconf)
463-
{
460+
if let Some(diagnostics) = self.state.upsert_file(&uri, content, &ipath, 8, &pconf) {
464461
if let Err(e) = self.client.publish_diagnostics(diagnostics) {
465462
error!(error=%e, "failed to publish diagnostics")
466463
}

src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl ProtoLanguageState {
236236
// Add protoc diagnostics if enabled
237237
if config.experimental.use_protoc_diagnostics {
238238
if let Ok(protoc_diagnostics) = self.protoc_diagnostics.lock() {
239-
if let Some(file_path) = uri.to_file_path().ok() {
239+
if let Ok(file_path) = uri.to_file_path() {
240240
let protoc_diags = protoc_diagnostics.collect_diagnostics(
241241
&config.experimental.protoc_path,
242242
file_path.to_str().unwrap_or_default(),

src/workspace/definition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mod test {
9292
));
9393

9494
let loc = state.definition(
95-
&vec![std::env::current_dir().unwrap().join(&ipath[0])],
95+
&[std::env::current_dir().unwrap().join(&ipath[0])],
9696
"com.workspace",
9797
Jumpable::Import("c.proto".to_owned()),
9898
);

0 commit comments

Comments
 (0)