Fix broken tests + misc cleanup

Move all the examples which don't compile to the `old/` directory.
This commit is contained in:
2020-12-06 13:31:13 -08:00
parent 7e2046f5bd
commit 8d4a3a91fe
11 changed files with 146 additions and 12 deletions

View File

@@ -285,12 +285,12 @@ impl Renderer for ColorTermRenderer {
max_h = max_h.saturating_sub(1 + measurements.len() as u16);
let im = RenderSteps::render_configured(state, &[], z, (max_w as _, max_h as _));
let mut stdout = std::io::stdout();
// TODO: consider clearing line-by-line for less tearing?
stdout.queue(crossterm::terminal::Clear(crossterm::terminal::ClearType::All)).unwrap();
stdout.queue(cursor::MoveTo(0, 0)).unwrap();
for row in im.rows() {
stdout.queue(cursor::MoveDown(1)).unwrap();
stdout.queue(cursor::MoveToColumn(0)).unwrap();
for p in row {
stdout.queue(PrintStyledContent(style(" ").on(Color::Rgb {
r: p.0[0],
@@ -298,9 +298,10 @@ impl Renderer for ColorTermRenderer {
b: p.0[2],
}))).unwrap();
}
stdout.queue(cursor::MoveDown(1)).unwrap();
stdout.queue(cursor::MoveToColumn(0)).unwrap();
}
stdout.queue(cursor::MoveDown(1)).unwrap();
stdout.queue(cursor::MoveToColumn(1)).unwrap();
stdout.queue(PrintStyledContent(style(format!("z: {}", z)))).unwrap();
for m in measurements {
let meas_string = m.eval(state);