diff options
author | Joscha <joscha@plugh.de> | 2022-08-30 17:32:53 +0200 |
---|---|---|
committer | Joscha <joscha@plugh.de> | 2022-08-30 17:32:57 +0200 |
commit | 19febc188ec60842daa86fee360c292e575cc062 (patch) | |
tree | 12e18e162a243b3ebffd283ac26096fe9eac2a70 | |
parent | 21245a82744521f0243acea94d32ae083465ca60 (diff) |
Remove unnecessary mut-s
-rw-r--r-- | src/ui/chat/tree/layout.rs | 6 | ||||
-rw-r--r-- | 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<M: Msg + ChatMsg, S: MsgStore<M>> InnerTreeViewState<M, S> { } } - fn scroll_so_cursor_is_visible(&self, frame: &mut Frame, blocks: &mut TreeBlocks<M::Id>) { + fn scroll_so_cursor_is_visible(&self, frame: &Frame, blocks: &mut TreeBlocks<M::Id>) { if matches!(self.cursor, Cursor::Bottom) { return; // Cursor is locked to bottom } @@ -368,7 +368,7 @@ impl<M: Msg + ChatMsg, S: MsgStore<M>> InnerTreeViewState<M, S> { } } - fn scroll_so_cursor_is_centered(&self, frame: &mut Frame, blocks: &mut TreeBlocks<M::Id>) { + fn scroll_so_cursor_is_centered(&self, frame: &Frame, blocks: &mut TreeBlocks<M::Id>) { if matches!(self.cursor, Cursor::Bottom) { return; // Cursor is locked to bottom } @@ -409,7 +409,7 @@ impl<M: Msg + ChatMsg, S: MsgStore<M>> InnerTreeViewState<M, S> { fn move_cursor_so_it_is_visible( &mut self, - frame: &mut Frame, + frame: &Frame, blocks: &TreeBlocks<M::Id>, ) -> Option<M::Id> { 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; |