From da786170f82717bba8086e6618382e57b5e98180 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 31 Aug 2023 10:15:31 +0300 Subject: [PATCH] Use proper assertion in on-type formatting edits Co-authored-by: DropDemBits --- crates/rust-analyzer/src/handlers/request.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/handlers/request.rs b/crates/rust-analyzer/src/handlers/request.rs index 5f1f731cffb..a09a5e111ab 100644 --- a/crates/rust-analyzer/src/handlers/request.rs +++ b/crates/rust-analyzer/src/handlers/request.rs @@ -354,7 +354,7 @@ pub(crate) fn handle_on_type_formatting( // This should be a single-file edit let (_, (text_edit, snippet_edit)) = edit.source_file_edits.into_iter().next().unwrap(); - stdx::never!(snippet_edit.is_none(), "on type formatting shouldn't use structured snippets"); + stdx::always!(snippet_edit.is_none(), "on type formatting shouldn't use structured snippets"); let change = to_proto::snippet_text_edit_vec(&line_index, edit.is_snippet, text_edit); Ok(Some(change))