diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-01-06 01:42:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-06 01:42:55 +0000 |
commit | 2920cbe7103f03a45080bfb7610bd7f481f36361 (patch) | |
tree | 4839deca8a54d8e2546d124eb26178fd1eac4d4a /src/grid.rs | |
parent | 650b5a0cbaccc6de2b53240372c2be79739d5d12 (diff) | |
download | alacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.tar.gz alacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.zip |
Add clippy check to travis
This commit adds clippy as a required step of the build process. To make
this possible, all existing clippy issues have been resolved.
Diffstat (limited to 'src/grid.rs')
-rw-r--r-- | src/grid.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/grid.rs b/src/grid.rs index c57787bf..ed7efdb4 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -151,14 +151,14 @@ impl<T> Grid<T> { } #[inline] - pub fn scroll_down(&mut self, region: Range<index::Line>, positions: index::Line) { + pub fn scroll_down(&mut self, region: &Range<index::Line>, positions: index::Line) { for line in IndexRange((region.start + positions)..region.end).rev() { self.swap_lines(line, line - positions); } } #[inline] - pub fn scroll_up(&mut self, region: Range<index::Line>, positions: index::Line) { + pub fn scroll_up(&mut self, region: &Range<index::Line>, positions: index::Line) { for line in IndexRange(region.start..(region.end - positions)) { self.swap_lines(line, line + positions); } @@ -618,7 +618,7 @@ mod tests { info!("grid: {:?}", grid); - grid.scroll_up(Line(0)..Line(10), Line(2)); + grid.scroll_up(&(Line(0)..Line(10)), Line(2)); info!("grid: {:?}", grid); @@ -652,7 +652,7 @@ mod tests { info!("grid: {:?}", grid); - grid.scroll_down(Line(0)..Line(10), Line(2)); + grid.scroll_down(&(Line(0)..Line(10)), Line(2)); info!("grid: {:?}", grid); |