Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/render/variant.rs')
-rw-r--r--crates/ide-completion/src/render/variant.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide-completion/src/render/variant.rs b/crates/ide-completion/src/render/variant.rs
index d69906a706..5995da68a1 100644
--- a/crates/ide-completion/src/render/variant.rs
+++ b/crates/ide-completion/src/render/variant.rs
@@ -35,8 +35,8 @@ pub(crate) fn render_record_lit(
});
RenderedLiteral {
- literal: format!("{} {{ {} }}", path, completions),
- detail: format!("{} {{ {} }}", path, types),
+ literal: format!("{path} {{ {completions} }}"),
+ detail: format!("{path} {{ {types} }}"),
}
}
@@ -49,7 +49,7 @@ pub(crate) fn render_tuple_lit(
path: &str,
) -> RenderedLiteral {
if snippet_cap.is_none() {
- return RenderedLiteral { literal: format!("{}", path), detail: format!("{}", path) };
+ return RenderedLiteral { literal: format!("{path}"), detail: format!("{path}") };
}
let completions = fields.iter().enumerate().format_with(", ", |(idx, _), f| {
if snippet_cap.is_some() {
@@ -62,8 +62,8 @@ pub(crate) fn render_tuple_lit(
let types = fields.iter().format_with(", ", |field, f| f(&field.ty(db).display(db)));
RenderedLiteral {
- literal: format!("{}({})", path, completions),
- detail: format!("{}({})", path, types),
+ literal: format!("{path}({completions})"),
+ detail: format!("{path}({types})"),
}
}