mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 13:18:47 +00:00
Merge #10167
10167: minor: Avoid extra allocation in completion rendering r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
7d9eb4fd73
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ pub(crate) fn render_field(
|
|||
.lookup_by(name.as_str());
|
||||
let is_keyword = SyntaxKind::from_keyword(name.as_str()).is_some();
|
||||
if is_keyword && !matches!(name.as_str(), "self" | "crate" | "super" | "Self") {
|
||||
item.insert_text(String::from("r#") + name.as_str());
|
||||
item.insert_text(format!("r#{}", name));
|
||||
}
|
||||
if let Some(_ref_match) = compute_ref_match(ctx.completion, ty) {
|
||||
// FIXME
|
||||
|
|
Loading…
Reference in a new issue