diff options
Diffstat (limited to 'src/row.rs')
-rw-r--r-- | src/row.rs | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -2,14 +2,14 @@ use crate::term::BufWrite as _; #[derive(Clone, Debug)] pub struct Row { - cells: Vec<crate::cell::Cell>, + cells: Vec<crate::Cell>, wrapped: bool, } impl Row { pub fn new(cols: u16) -> Self { Self { - cells: vec![crate::cell::Cell::default(); usize::from(cols)], + cells: vec![crate::Cell::default(); usize::from(cols)], wrapped: false, } } @@ -29,19 +29,19 @@ impl Row { self.wrapped = false; } - fn cells(&self) -> impl Iterator<Item = &crate::cell::Cell> { + fn cells(&self) -> impl Iterator<Item = &crate::Cell> { self.cells.iter() } - pub fn get(&self, col: u16) -> Option<&crate::cell::Cell> { + pub fn get(&self, col: u16) -> Option<&crate::Cell> { self.cells.get(usize::from(col)) } - pub fn get_mut(&mut self, col: u16) -> Option<&mut crate::cell::Cell> { + pub fn get_mut(&mut self, col: u16) -> Option<&mut crate::Cell> { self.cells.get_mut(usize::from(col)) } - pub fn insert(&mut self, i: u16, cell: crate::cell::Cell) { + pub fn insert(&mut self, i: u16, cell: crate::Cell) { self.cells.insert(usize::from(i), cell); self.wrapped = false; } @@ -70,7 +70,7 @@ impl Row { } } - pub fn resize(&mut self, len: u16, cell: crate::cell::Cell) { + pub fn resize(&mut self, len: u16, cell: crate::Cell) { self.cells.resize(usize::from(len), cell); self.wrapped = false; } @@ -145,7 +145,7 @@ impl Row { prev_attrs: Option<crate::attrs::Attrs>, ) -> (crate::grid::Pos, crate::attrs::Attrs) { let mut prev_was_wide = false; - let default_cell = crate::cell::Cell::default(); + let default_cell = crate::Cell::default(); let mut prev_pos = prev_pos.unwrap_or_else(|| { if wrapping { |