diff options
author | Joe Wilm <joe@jwilm.com> | 2018-05-29 21:33:13 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-06-02 09:56:50 -0700 |
commit | 9a98d5e0ee9139d5a2988d125352c5d70a39ad20 (patch) | |
tree | d4182e59cdd6b66ad1c4d56cbeae0ffe58003ecf /src/grid/mod.rs | |
parent | efc568be4e7da9481f5b6d35ff2854c1ff4cd2be (diff) | |
download | alacritty-9a98d5e0ee9139d5a2988d125352c5d70a39ad20.tar.gz alacritty-9a98d5e0ee9139d5a2988d125352c5d70a39ad20.zip |
Refactor Storage<T> to be a Vec<Row<T>> internally
This will allow certain optimizations around swap which are currently
only possible in a generalized way with specialization.
Diffstat (limited to 'src/grid/mod.rs')
-rw-r--r-- | src/grid/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/grid/mod.rs b/src/grid/mod.rs index c9829c2e..b03ae54f 100644 --- a/src/grid/mod.rs +++ b/src/grid/mod.rs @@ -67,7 +67,7 @@ impl<T: PartialEq> ::std::cmp::PartialEq for Grid<T> { pub struct Grid<T> { /// Lines in the grid. Each row holds a list of cells corresponding to the /// columns in that row. - raw: Storage<Row<T>>, + raw: Storage<T>, /// Number of columns cols: index::Column, @@ -540,7 +540,7 @@ impl<'point, T> IndexMut<&'point Point> for Grid<T> { pub struct Region<'a, T: 'a> { start: Line, end: Line, - raw: &'a Storage<Row<T>>, + raw: &'a Storage<T>, } /// A mutable subset of lines in the grid @@ -549,7 +549,7 @@ pub struct Region<'a, T: 'a> { pub struct RegionMut<'a, T: 'a> { start: Line, end: Line, - raw: &'a mut Storage<Row<T>>, + raw: &'a mut Storage<T>, } impl<'a, T> RegionMut<'a, T> { @@ -653,13 +653,13 @@ impl<T> IndexRegion<RangeFull, T> for Grid<T> { pub struct RegionIter<'a, T: 'a> { end: Line, cur: Line, - raw: &'a Storage<Row<T>>, + raw: &'a Storage<T>, } pub struct RegionIterMut<'a, T: 'a> { end: Line, cur: Line, - raw: &'a mut Storage<Row<T>>, + raw: &'a mut Storage<T>, } impl<'a, T> IntoIterator for Region<'a, T> { |