We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f53026 + a60168e commit 1b54056Copy full SHA for 1b54056
crates/completion/src/item.rs
@@ -398,7 +398,9 @@ impl Builder {
398
pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder {
399
self.detail = detail.map(Into::into);
400
if let Some(detail) = &self.detail {
401
- assert_never!(detail.contains('\n'), "multiline detail: {}", detail);
+ if assert_never!(detail.contains('\n'), "multiline detail: {}", detail) {
402
+ self.detail = Some(detail.splitn(2, '\n').next().unwrap().to_string());
403
+ }
404
}
405
self
406
0 commit comments