mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
Tweak some Grid methods
Adds some #[inline] tags, and delegates to internals for num_rows and num_cols. In case these become different than the expected values, this should help to fail sooner.
This commit is contained in:
parent
7834bd177f
commit
581eb6b69f
1 changed files with 6 additions and 2 deletions
|
@ -71,20 +71,24 @@ impl Grid {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn rows(&self) -> vec_deque::Iter<Row> {
|
||||
self.raw.iter()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn rows_mut(&mut self) -> vec_deque::IterMut<Row> {
|
||||
self.raw.iter_mut()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn num_rows(&self) -> usize {
|
||||
self.rows
|
||||
self.raw.len()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn num_cols(&self) -> usize {
|
||||
self.cols
|
||||
self.raw[0].len()
|
||||
}
|
||||
|
||||
pub fn feed(&mut self) {
|
||||
|
|
Loading…
Reference in a new issue