From 6113359b8fa0637a3a5eff2339c332f75bfcd336 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 3 Apr 2025 18:35:34 +0200 Subject: [PATCH] Removed unnecesary String clone in `local_search_grep` --- helix-term/src/commands.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 6c284b240..c74690fa9 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2697,9 +2697,8 @@ fn local_search_grep(cx: &mut Context) { }), PickerColumn::new("", |item: &FileResult, _config: &LocalSearchConfig| { // extract line content to be displayed in the picker - let line_content = item.line_content.clone(); // create column value to be displayed in the picker - Cell::from(Spans::from(vec![Span::raw(line_content)])) + Cell::from(Spans::from(vec![Span::raw(&item.line_content)])) }), ];