diff options
-rw-r--r-- | src/grid.rs | 8 | ||||
-rw-r--r-- | src/screen.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/grid.rs b/src/grid.rs index 0522ee2..f6d3786 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -21,8 +21,8 @@ impl Grid { } } - pub fn size(&self) -> &Size { - &self.size + pub fn size(&self) -> Size { + self.size } pub fn set_size(&mut self, size: Size) { @@ -40,8 +40,8 @@ impl Grid { self.col_clamp(); } - pub fn pos(&self) -> &Pos { - &self.pos + pub fn pos(&self) -> Pos { + self.pos } pub fn set_pos(&mut self, mut pos: Pos) { diff --git a/src/screen.rs b/src/screen.rs index 94665e2..19655fe 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -84,7 +84,7 @@ impl State { } fn new_grid(&self) -> crate::grid::Grid { - crate::grid::Grid::new(*self.grid().size()) + crate::grid::Grid::new(self.grid().size()) } fn grid(&self) -> &crate::grid::Grid { @@ -179,7 +179,7 @@ impl State { impl State { fn text(&mut self, c: char) { - let pos = *self.grid().pos(); + let pos = self.grid().pos(); if pos.col > 0 { let prev_cell = self .cell_mut(crate::grid::Pos { @@ -661,7 +661,7 @@ impl vte::Perform for State { 'm' => self.sgr(canonicalize_params_multi(params)), 'r' => self.csr(canonicalize_params_csr( params, - *self.grid().size(), + self.grid().size(), )), _ => { if log::log_enabled!(log::Level::Warn) { |