From 9a065b65e9e6187dd6a35e0765ab027ee0f79c4e Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 29 Jan 2022 16:55:28 -0800 Subject: [PATCH] Fix unnecessary borrows --- src/side_by_side.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/side_by_side.rs b/src/side_by_side.rs index e1e78b417..87ee457b7 100644 --- a/src/side_by_side.rs +++ b/src/side_by_side.rs @@ -366,7 +366,7 @@ pub fn display_hunks( } else { let lhs_line = match lhs_line_num { Some(lhs_line_num) => split_and_apply( - &lhs_lines[lhs_line_num.0], + lhs_lines[lhs_line_num.0], widths.lhs_content, lhs_highlights.get(&lhs_line_num).unwrap_or(&vec![]), ), @@ -374,7 +374,7 @@ pub fn display_hunks( }; let rhs_line = match rhs_line_num { Some(rhs_line_num) => split_and_apply( - &rhs_lines[rhs_line_num.0], + rhs_lines[rhs_line_num.0], widths.rhs_content, rhs_highlights.get(&rhs_line_num).unwrap_or(&vec![]), ),