From a3bd80a6fa4f07b0fa581eae416376763ba94345 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Tue, 31 Aug 2021 18:29:24 +0900 Subject: ui: prompt: Avoid allocating a prompt name if it's a static string --- helix-term/src/ui/picker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui/picker.rs') 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 Picker { 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| { -- cgit v1.2.3-70-g09d2