diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-03-30 16:48:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-30 16:48:36 +0000 |
commit | cfd025b5289bc305470a96657868c982a2b13bc2 (patch) | |
tree | 093b9105c881e28b909e031c46d2054016b643b3 /src/grid/tests.rs | |
parent | 91aa683bcd060b2ac2f621a388a6448f564d0537 (diff) | |
download | alacritty-cfd025b5289bc305470a96657868c982a2b13bc2.tar.gz alacritty-cfd025b5289bc305470a96657868c982a2b13bc2.zip |
Add rustfmt style guidev0.3.0-rc1
Diffstat (limited to 'src/grid/tests.rs')
-rw-r--r-- | src/grid/tests.rs | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/grid/tests.rs b/src/grid/tests.rs index 82edda69..fc41fdc6 100644 --- a/src/grid/tests.rs +++ b/src/grid/tests.rs @@ -14,10 +14,10 @@ //! Tests for the Gird -use super::{Grid, BidirectionalIterator}; -use crate::index::{Point, Line, Column}; -use crate::term::cell::{Cell, Flags}; +use super::{BidirectionalIterator, Grid}; use crate::grid::GridCell; +use crate::index::{Column, Line, Point}; +use crate::term::cell::{Cell, Flags}; impl GridCell for usize { fn is_empty(&self) -> bool { @@ -101,14 +101,11 @@ fn test_iter() { let mut grid = Grid::new(Line(5), Column(5), 0, 0); for i in 0..5 { for j in 0..5 { - grid[Line(i)][Column(j)] = i*5 + j; + grid[Line(i)][Column(j)] = i * 5 + j; } } - let mut iter = grid.iter_from(Point { - line: 4, - col: Column(0), - }); + let mut iter = grid.iter_from(Point { line: 4, col: Column(0) }); assert_eq!(None, iter.prev()); assert_eq!(Some(&1), iter.next()); @@ -128,12 +125,8 @@ fn test_iter() { assert_eq!(Column(4), iter.cur.col); assert_eq!(4, iter.cur.line); - // test that iter ends at end of grid - let mut final_iter = grid.iter_from(Point { - line: 0, - col: Column(4), - }); + let mut final_iter = grid.iter_from(Point { line: 0, col: Column(4) }); assert_eq!(None, final_iter.next()); assert_eq!(Some(&23), final_iter.prev()); } |