diff options
Diffstat (limited to 'src/grid.rs')
-rw-r--r-- | src/grid.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/grid.rs b/src/grid.rs index a6a41df..dee4e10 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -76,7 +76,7 @@ impl Grid { self.size = size; for row in &mut self.rows { - row.resize(size.cols, crate::cell::Cell::default()); + row.resize(size.cols, crate::Cell::default()); } self.rows.resize(usize::from(size.rows), self.new_row()); @@ -156,18 +156,15 @@ impl Grid { .unwrap() } - pub fn visible_cell(&self, pos: Pos) -> Option<&crate::cell::Cell> { + pub fn visible_cell(&self, pos: Pos) -> Option<&crate::Cell> { self.visible_row(pos.row).and_then(|r| r.get(pos.col)) } - pub fn drawing_cell(&self, pos: Pos) -> Option<&crate::cell::Cell> { + pub fn drawing_cell(&self, pos: Pos) -> Option<&crate::Cell> { self.drawing_row(pos.row).and_then(|r| r.get(pos.col)) } - pub fn drawing_cell_mut( - &mut self, - pos: Pos, - ) -> Option<&mut crate::cell::Cell> { + pub fn drawing_cell_mut(&mut self, pos: Pos) -> Option<&mut crate::Cell> { self.drawing_row_mut(pos.row) .and_then(|r| r.get_mut(pos.col)) } @@ -499,7 +496,7 @@ impl Grid { if wide { row.get_mut(pos.col).unwrap().set_wide_continuation(false); } - row.insert(pos.col, crate::cell::Cell::default()); + row.insert(pos.col, crate::Cell::default()); if wide { row.get_mut(pos.col).unwrap().set_wide_continuation(true); } @@ -514,7 +511,7 @@ impl Grid { for _ in 0..(count.min(size.cols - pos.col)) { row.remove(pos.col); } - row.resize(size.cols, crate::cell::Cell::default()); + row.resize(size.cols, crate::Cell::default()); } pub fn erase_cells(&mut self, count: u16, attrs: crate::attrs::Attrs) { |