aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/item.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-26 19:14:16 +0000
committerGitHub <[email protected]>2021-01-26 19:14:16 +0000
commit8775bc4be18fac9c7935c1edeacf048c515e7518 (patch)
tree3371f60836fdab03f218793582d428ef7751fe55 /crates/completion/src/item.rs
parent2664aee8e5976f590e2fcb700982488ae2358780 (diff)
parentd35bda6429b0a3a758ddcd899e954043584f1071 (diff)
Merge #7455
7455: Make always-assert crate reusable r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/completion/src/item.rs')
-rw-r--r--crates/completion/src/item.rs4
1 files changed, 2 insertions, 2 deletions
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::{
10 }, 10 },
11 SymbolKind, 11 SymbolKind,
12}; 12};
13use stdx::{assert_never, impl_from}; 13use stdx::{impl_from, never};
14use syntax::{algo, TextRange}; 14use syntax::{algo, TextRange};
15use text_edit::TextEdit; 15use text_edit::TextEdit;
16 16
@@ -404,7 +404,7 @@ impl Builder {
404 pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder { 404 pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder {
405 self.detail = detail.map(Into::into); 405 self.detail = detail.map(Into::into);
406 if let Some(detail) = &self.detail { 406 if let Some(detail) = &self.detail {
407 if assert_never!(detail.contains('\n'), "multiline detail:\n{}", detail) { 407 if never!(detail.contains('\n'), "multiline detail:\n{}", detail) {
408 self.detail = Some(detail.splitn(2, '\n').next().unwrap().to_string()); 408 self.detail = Some(detail.splitn(2, '\n').next().unwrap().to_string());
409 } 409 }
410 } 410 }