From 395ad40bc11a3328abf0e1d3da6f39d2ffb9a7f7 Mon Sep 17 00:00:00 2001 From: Pavel Roskin <1317472+proski@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:42:35 -0700 Subject: [PATCH] Remove unnecessary mutable references --- alacritty/src/display/content.rs | 4 ++-- alacritty_terminal/src/vi_mode.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index 72f71e9b..f4e34c10 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -303,7 +303,7 @@ impl RenderableCell { } /// Get the RGB color from a cell's foreground color. - fn compute_fg_rgb(content: &mut RenderableContent<'_>, fg: Color, flags: Flags) -> Rgb { + fn compute_fg_rgb(content: &RenderableContent<'_>, fg: Color, flags: Flags) -> Rgb { let config = &content.config; match fg { Color::Spec(rgb) => match flags & Flags::DIM { @@ -351,7 +351,7 @@ impl RenderableCell { /// Get the RGB color from a cell's background color. #[inline] - fn compute_bg_rgb(content: &mut RenderableContent<'_>, bg: Color) -> Rgb { + fn compute_bg_rgb(content: &RenderableContent<'_>, bg: Color) -> Rgb { match bg { Color::Spec(rgb) => rgb.into(), Color::Named(ansi) => content.color(ansi as usize), diff --git a/alacritty_terminal/src/vi_mode.rs b/alacritty_terminal/src/vi_mode.rs index 7b4de605..d4f66d9e 100644 --- a/alacritty_terminal/src/vi_mode.rs +++ b/alacritty_terminal/src/vi_mode.rs @@ -243,7 +243,7 @@ fn first_occupied(term: &Term, mut point: Point) -> Point { /// Move by semantically separated word, like w/b/e/ge in vi. fn semantic( - term: &mut Term, + term: &Term, mut point: Point, direction: Direction, side: Side, @@ -293,7 +293,7 @@ fn semantic( /// Move by whitespace separated word, like W/B/E/gE in vi. fn word( - term: &mut Term, + term: &Term, mut point: Point, direction: Direction, side: Side,