about summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-01-28 18:00:07 -0800
committerCamelid <camelidcamel@gmail.com>2021-01-28 18:00:07 -0800
commitf620b5ced22e43bf484ca02f08b09dd45a30e0a1 (patch)
tree5c75887886d84dd182f4ad415cc0553136cac71f /src/librustdoc/lib.rs
parentbf193d69fe48f4ec3cac57ab7abb4e9f2a291661 (diff)
downloadrust-f620b5ced22e43bf484ca02f08b09dd45a30e0a1.tar.gz
rust-f620b5ced22e43bf484ca02f08b09dd45a30e0a1.zip
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".
Diffstat (limited to 'src/librustdoc/lib.rs')
-rw-r--r--src/librustdoc/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index c61cbf78f77..e98cb237635 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -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,