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

@@ -578,7 +578,7 @@ fn main_options(options: config::Options) -> MainResult {
let (error_format, edition, debugging_options) = diag_opts;
let diag = core::new_handler(error_format, None, &debugging_options);
match output_format {
None | Some(config::OutputFormat::Html) => sess.time("render_html", || {
config::OutputFormat::Html => sess.time("render_html", || {
run_renderer::<html::render::Context<'_>>(
krate,
render_opts,
@@ -588,7 +588,7 @@ fn main_options(options: config::Options) -> MainResult {
tcx,
)
}),
Some(config::OutputFormat::Json) => sess.time("render_json", || {
config::OutputFormat::Json => sess.time("render_json", || {
run_renderer::<json::JsonRenderer<'_>>(
krate,
render_opts,