Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
OutputFormatter
, defaulting to OutputFormatter::RawThenSummary
.
fm's "summary" output is mostly quite useful, in that it quickly directs the reader's eyes to where a problem was encountered. Sometimes, however, you need to see the output before that to understand how an error happened where it did. This commit gives an fm user the ability to choose from 3 outputs: `InputThenSummary` (the new default), `SummaryOnly` (the old default), and `InputOnly`. For example `InputThenSummary` produces output along the lines of: ``` Raw text: |1 |2 |3 |4 |6 |7 |8 |9 |10 Pattern (error at line 5): ... |2 |3 |4 >> |5 |6 |7 |8 ... Text (error at line 5): ... |2 |3 |4 >> |6 |7 |8 |9 ... ``` Note that I had to take `PartialEq` of `FMatchError`. I don't really know why `FMatchError` impled `PartialEq`, but technically a user could rely on it, so this commit technically breaks backwards compatibility.
- Loading branch information