aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-03-09 01:45:05 -0500
committerJesse Luehrs <doy@tozt.net>2023-03-09 01:45:05 -0500
commitb615e03beb20cb836fe643b57291657b9c2845d8 (patch)
tree9880823cbc1235ea84f1d5e60c9b4dbddd88b678 /tests
parente11519d403f5ac0cdff70f1029791c0aa9dbe8d5 (diff)
downloadvt100-rust-b615e03beb20cb836fe643b57291657b9c2845d8.tar.gz
vt100-rust-b615e03beb20cb836fe643b57291657b9c2845d8.zip
stop implementing Default for Cell
Diffstat (limited to 'tests')
-rw-r--r--tests/helpers/fixtures.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/helpers/fixtures.rs b/tests/helpers/fixtures.rs
index bc39926..44105ec 100644
--- a/tests/helpers/fixtures.rs
+++ b/tests/helpers/fixtures.rs
@@ -89,12 +89,14 @@ impl FixtureScreen {
#[allow(dead_code)]
pub fn from_screen(screen: &vt100::Screen) -> Self {
+ let empty_screen = vt100::Parser::default().screen().clone();
+ let empty_cell = empty_screen.cell(0, 0).unwrap();
let mut cells = std::collections::BTreeMap::new();
let (rows, cols) = screen.size();
for row in 0..rows {
for col in 0..cols {
let cell = screen.cell(row, col).unwrap();
- if cell != &vt100::Cell::default() {
+ if cell != empty_cell {
cells.insert(
format!("{row},{col}"),
FixtureCell::from_cell(cell),