Skip to content

Commit d382e24

Browse files
committed
Auto merge of rust-lang#12108 - Veykril:simplify, r=Veykril
minor: Record snippet config errors
2 parents 241b9f9 + 075b189 commit d382e24

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,12 @@ impl Config {
584584
scope,
585585
) {
586586
Some(snippet) => self.snippets.push(snippet),
587-
None => tracing::info!("Invalid snippet {}", name),
587+
None => errors.push((
588+
format!("snippet {name} is invalid"),
589+
<serde_json::Error as serde::de::Error>::custom(
590+
"snippet path is invalid or triggers are missing",
591+
),
592+
)),
588593
}
589594
}
590595

crates/rust-analyzer/src/global_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl GlobalState {
290290
}
291291

292292
let duration = start.elapsed();
293-
tracing::info!("handled {} - ({}) in {:0.2?}", method, response.id, duration);
293+
tracing::debug!("handled {} - ({}) in {:0.2?}", method, response.id, duration);
294294
self.send(response.into());
295295
}
296296
}

crates/rust-analyzer/src/main_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl GlobalState {
314314
self.prime_caches_queue.op_completed(());
315315
if cancelled {
316316
self.prime_caches_queue
317-
.request_op("restart after cancelation".to_string());
317+
.request_op("restart after cancellation".to_string());
318318
}
319319
}
320320
};

0 commit comments

Comments
 (0)