Unnamed repository; edit this file 'description' to name the repository.
Update crates/ide_completion/src/render/function.rs
Co-authored-by: Lukas Wirth <[email protected]>
cameron1024 2022-04-04
parent bb1c3a2 · commit 37d2a82
-rw-r--r--crates/ide_completion/src/render/function.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_completion/src/render/function.rs b/crates/ide_completion/src/render/function.rs
index c0f38a8fcd..2031eef049 100644
--- a/crates/ide_completion/src/render/function.rs
+++ b/crates/ide_completion/src/render/function.rs
@@ -142,7 +142,7 @@ pub(super) fn add_call_parens<'b>(
.name(ctx.db)
.as_text()
.map(|s| to_lower_snake_case(s.as_str()))
- .unwrap_or("_".to_string()),
+ .unwrap_or_else(|| "_".to_string()),
};
f(&format_args!("${{{}:{}}}", index + offset, name))
}