Skip to content

Commit

Permalink
Remove redundant assignment
Browse files Browse the repository at this point in the history
`crate.name` is already set by `tcx.crate_name`, there's no need to
override it.
  • Loading branch information
jyn514 committed Dec 16, 2020
1 parent f76ecd0 commit c18c7c7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,17 +519,12 @@ fn main_options(options: config::Options) -> MainResult {
// compiler all the way through the analysis passes. The rustdoc output is
// then generated from the cleaned AST of the crate. This runs all the
// plug/cleaning passes.
let crate_name = options.crate_name.clone();
let crate_version = options.crate_version.clone();
let output_format = options.output_format;
let (mut krate, renderinfo, renderopts, sess) = core::run_core(options);

info!("finished with rustc");

if let Some(name) = crate_name {
krate.name = name
}

krate.version = crate_version;

if show_coverage {
Expand Down

0 comments on commit c18c7c7

Please sign in to comment.