mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Simplify
This commit is contained in:
parent
284c1741d6
commit
8ea1afce28
16 changed files with 197 additions and 197 deletions
|
@ -66,7 +66,6 @@ impl flags::Scip {
|
|||
.as_os_str()
|
||||
.to_str()
|
||||
.ok_or(anyhow::anyhow!("Unable to normalize project_root path"))?
|
||||
.to_string()
|
||||
),
|
||||
text_document_encoding: scip_types::TextEncoding::UTF8.into(),
|
||||
special_fields: Default::default(),
|
||||
|
@ -212,7 +211,7 @@ fn new_descriptor_str(
|
|||
|
||||
fn new_descriptor(name: Name, suffix: scip_types::descriptor::Suffix) -> scip_types::Descriptor {
|
||||
let mut name = name.to_string();
|
||||
if name.contains("'") {
|
||||
if name.contains('\'') {
|
||||
name = format!("`{name}`");
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ fn completion_item(
|
|||
|
||||
let mut lsp_item = lsp_types::CompletionItem {
|
||||
label: item.label.to_string(),
|
||||
detail: item.detail.map(|it| it.to_string()),
|
||||
detail: item.detail,
|
||||
filter_text: Some(lookup),
|
||||
kind: Some(completion_item_kind(item.kind)),
|
||||
text_edit: Some(text_edit),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue