rustdoc: Remove unnecessary optional

Previously, the HTML output format was represented by both
`Some(OutputFormat::Html)` and `None` so there's no need to have an
optional. Instead, `OutputFormat::Html` is explicitly the default and we
no longer have a "tri-state enum".
This commit is contained in:
Camelid
2021-01-28 18:00:07 -08:00
parent bf193d69fe
commit f620b5ced2
4 changed files with 21 additions and 13 deletions

View File

@@ -132,7 +132,7 @@ impl<'a, 'b> CoverageCalculator<'a, 'b> {
fn print_results(&self) {
let output_format = self.ctx.renderinfo.borrow().output_format;
if output_format.map(|o| o.is_json()).unwrap_or_else(|| false) {
if output_format.is_json() {
println!("{}", self.to_json());
return;
}