From 19febc188ec60842daa86fee360c292e575cc062 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 30 Aug 2022 17:32:53 +0200 Subject: [PATCH] Remove unnecessary mut-s --- src/ui/chat/tree/layout.rs | 6 +++--- src/ui/chat/tree/widgets.rs | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/chat/tree/layout.rs b/src/ui/chat/tree/layout.rs index 7e41f00..a556fbf 100644 --- a/src/ui/chat/tree/layout.rs +++ b/src/ui/chat/tree/layout.rs @@ -342,7 +342,7 @@ impl> InnerTreeViewState { } } - fn scroll_so_cursor_is_visible(&self, frame: &mut Frame, blocks: &mut TreeBlocks) { + fn scroll_so_cursor_is_visible(&self, frame: &Frame, blocks: &mut TreeBlocks) { if matches!(self.cursor, Cursor::Bottom) { return; // Cursor is locked to bottom } @@ -368,7 +368,7 @@ impl> InnerTreeViewState { } } - fn scroll_so_cursor_is_centered(&self, frame: &mut Frame, blocks: &mut TreeBlocks) { + fn scroll_so_cursor_is_centered(&self, frame: &Frame, blocks: &mut TreeBlocks) { if matches!(self.cursor, Cursor::Bottom) { return; // Cursor is locked to bottom } @@ -409,7 +409,7 @@ impl> InnerTreeViewState { fn move_cursor_so_it_is_visible( &mut self, - frame: &mut Frame, + frame: &Frame, blocks: &TreeBlocks, ) -> Option { if !matches!(self.cursor, Cursor::Bottom | Cursor::Msg(_)) { diff --git a/src/ui/chat/tree/widgets.rs b/src/ui/chat/tree/widgets.rs index 2ba3d14..8733926 100644 --- a/src/ui/chat/tree/widgets.rs +++ b/src/ui/chat/tree/widgets.rs @@ -1,5 +1,3 @@ -// TODO Remove mut in &mut Frame wherever applicable in this entire module - mod indent; mod seen; mod time;