Remove unnecessary mut-s
This commit is contained in:
parent
21245a8274
commit
19febc188e
2 changed files with 3 additions and 5 deletions
|
|
@ -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) {
|
if matches!(self.cursor, Cursor::Bottom) {
|
||||||
return; // Cursor is locked to 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) {
|
if matches!(self.cursor, Cursor::Bottom) {
|
||||||
return; // Cursor is locked to 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(
|
fn move_cursor_so_it_is_visible(
|
||||||
&mut self,
|
&mut self,
|
||||||
frame: &mut Frame,
|
frame: &Frame,
|
||||||
blocks: &TreeBlocks<M::Id>,
|
blocks: &TreeBlocks<M::Id>,
|
||||||
) -> Option<M::Id> {
|
) -> Option<M::Id> {
|
||||||
if !matches!(self.cursor, Cursor::Bottom | Cursor::Msg(_)) {
|
if !matches!(self.cursor, Cursor::Bottom | Cursor::Msg(_)) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
// TODO Remove mut in &mut Frame wherever applicable in this entire module
|
|
||||||
|
|
||||||
mod indent;
|
mod indent;
|
||||||
mod seen;
|
mod seen;
|
||||||
mod time;
|
mod time;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue