diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-29 21:43:55 -0500 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-29 21:43:55 -0500 |
commit | 26ac1df0b19a1c880d346493670cb816a5d8dc06 (patch) | |
tree | 66b4eec62d6e281825abc6c6fb7dcbcfb858b13f /src/term/mod.rs | |
parent | a91a3f2dce121a179a9371cd0ad1e548cf3d7731 (diff) | |
download | r-alacritty-26ac1df0b19a1c880d346493670cb816a5d8dc06.tar.gz r-alacritty-26ac1df0b19a1c880d346493670cb816a5d8dc06.tar.bz2 r-alacritty-26ac1df0b19a1c880d346493670cb816a5d8dc06.zip |
Add Default impl for Cell
Just a bit of cleanup.
Diffstat (limited to 'src/term/mod.rs')
-rw-r--r-- | src/term/mod.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 4e4a022c..4f797871 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -277,11 +277,7 @@ impl SizeInfo { impl Term { pub fn new(size: SizeInfo) -> Term { - let template = Cell::new( - ' ', - Color::Named(NamedColor::Foreground), - Color::Named(NamedColor::Background) - ); + let template = Cell::default(); let num_cols = size.cols(); let num_lines = size.lines(); @@ -1040,7 +1036,6 @@ mod tests { use super::limit; - use ansi::{Color, NamedColor}; use grid::Grid; use index::{Line, Column}; use term::{Cell}; @@ -1051,11 +1046,7 @@ mod tests { /// test this property with a T=Cell. #[test] fn grid_serde() { - let template = Cell::new( - ' ', - Color::Named(NamedColor::Foreground), - Color::Named(NamedColor::Background) - ); + let template = Cell::default(); let grid = Grid::new(Line(24), Column(80), &template); let serialized = serde_json::to_string(&grid).expect("ser"); |