Skip to content

Commit 7d9eb4f

Browse files
bors[bot]lnicola
andauthored
Merge #10167
10167: minor: Avoid extra allocation in completion rendering r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <[email protected]>
2 parents 702f988 + d27ed8c commit 7d9eb4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide_completion/src/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub(crate) fn render_field(
101101
.lookup_by(name.as_str());
102102
let is_keyword = SyntaxKind::from_keyword(name.as_str()).is_some();
103103
if is_keyword && !matches!(name.as_str(), "self" | "crate" | "super" | "Self") {
104-
item.insert_text(String::from("r#") + name.as_str());
104+
item.insert_text(format!("r#{}", name));
105105
}
106106
if let Some(_ref_match) = compute_ref_match(ctx.completion, ty) {
107107
// FIXME

0 commit comments

Comments
 (0)