diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-03 08:56:00 +0000 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-03 08:56:00 +0000 |
commit | 343b1262b72a2614a0682f80b50bdd56ae762286 (patch) | |
tree | ed0b412139b949760be0e33ef170341d991bafb5 | |
parent | 24c4000ede94c88a263f9474df6f877450b4d60b (diff) | |
download | vt100-rust-343b1262b72a2614a0682f80b50bdd56ae762286.tar.gz vt100-rust-343b1262b72a2614a0682f80b50bdd56ae762286.zip |
no reason to use references here
-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) { |