Skip to main content

Module report

Module report 

Source
Expand description

Terminal rendering.

A run produces a lot of state; the report exists so the operator can decide what to do next without opening run.json. It leads with the disagreement, because that is the part that carries information: three judges agreeing tells you nothing the winner’s diff does not.

Colour is a six-line local implementation rather than a crate. The alternatives all decide for you whether the stream supports colour, which makes the output untestable — assert!(text.contains("winner A")) fails on an escape sequence the test never asked for.

Functions§

active_seats
The seats currently mid-answer, for magi show and the raw report route.
line
One-line summary, for magi list.
run
Full report for one run.
set_color
Turn colour on or off for every subsequent render.
stats
Aggregate tables, for magi stats.