From d35bda6429b0a3a758ddcd899e954043584f1071 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 26 Jan 2021 22:11:12 +0300 Subject: Make always-assert crate reusable --- crates/completion/src/item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/completion') diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs index eeb952ec3..8ec4ac65e 100644 --- a/crates/completion/src/item.rs +++ b/crates/completion/src/item.rs @@ -10,7 +10,7 @@ use ide_db::{ }, SymbolKind, }; -use stdx::{assert_never, impl_from}; +use stdx::{impl_from, never}; use syntax::{algo, TextRange}; use text_edit::TextEdit; @@ -404,7 +404,7 @@ impl Builder { pub(crate) fn set_detail(mut self, detail: Option>) -> Builder { self.detail = detail.map(Into::into); if let Some(detail) = &self.detail { - if assert_never!(detail.contains('\n'), "multiline detail:\n{}", detail) { + if never!(detail.contains('\n'), "multiline detail:\n{}", detail) { self.detail = Some(detail.splitn(2, '\n').next().unwrap().to_string()); } } -- cgit v1.2.3