summaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorAlexis (Poliorcetics) Bourget2022-10-08 18:06:23 +0000
committerBlaž Hrastnik2022-10-11 06:47:11 +0000
commitb58899bc8e0f339fd83a1740a896fcc62976f7a7 (patch)
tree9718f9576c9f890171e41c6a9636a43651d024d4 /helix-term/src/commands.rs
parent28cb89eadb67b6526b026105919a772ce8e726a3 (diff)
fix: remove unneeded allocations when calling helix_view::Info::new
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs8
1 files changed, 1 insertions, 7 deletions
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) {