aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/picker.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-08-31 09:29:24 +0000
committerBlaž Hrastnik2021-08-31 09:29:24 +0000
commita3bd80a6fa4f07b0fa581eae416376763ba94345 (patch)
tree3681dedb9aed053396ed20d9937a868dbbdba9fc /helix-term/src/ui/picker.rs
parent9b96bb5ac802189f567b101f7c8da4b370a2fdd1 (diff)
ui: prompt: Avoid allocating a prompt name if it's a static string
Diffstat (limited to 'helix-term/src/ui/picker.rs')
-rw-r--r--helix-term/src/ui/picker.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index ef2c434c..06e424ea 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -202,7 +202,7 @@ impl<T> Picker<T> {
callback_fn: impl Fn(&mut Editor, &T, Action) + 'static,
) -> Self {
let prompt = Prompt::new(
- "".to_string(),
+ "".into(),
None,
|_pattern: &str| Vec::new(),
|_editor: &mut Context, _pattern: &str, _event: PromptEvent| {