From b58899bc8e0f339fd83a1740a896fcc62976f7a7 Mon Sep 17 00:00:00 2001 From: Alexis (Poliorcetics) Bourget Date: Sat, 8 Oct 2022 20:06:23 +0200 Subject: fix: remove unneeded allocations when calling helix_view::Info::new --- helix-term/src/commands.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'helix-term/src') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 754e4473..ad84c85c 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4455,13 +4455,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) { (" ", "... or any character acting as a pair"), ]; - cx.editor.autoinfo = Some(Info::new( - title, - help_text - .into_iter() - .map(|(col1, col2)| (col1.to_string(), col2.to_string())) - .collect(), - )); + cx.editor.autoinfo = Some(Info::new(title, &help_text)); } fn surround_add(cx: &mut Context) { -- cgit v1.2.3-70-g09d2