diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-26 19:14:16 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-26 19:14:16 +0000 |
commit | 8775bc4be18fac9c7935c1edeacf048c515e7518 (patch) | |
tree | 3371f60836fdab03f218793582d428ef7751fe55 /crates/completion/src/item.rs | |
parent | 2664aee8e5976f590e2fcb700982488ae2358780 (diff) | |
parent | d35bda6429b0a3a758ddcd899e954043584f1071 (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.rs | 4 |
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 | }; |
13 | use stdx::{assert_never, impl_from}; | 13 | use stdx::{impl_from, never}; |
14 | use syntax::{algo, TextRange}; | 14 | use syntax::{algo, TextRange}; |
15 | use text_edit::TextEdit; | 15 | use 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 | } |