Remove unnecessary Option in default_doc

Previously, there two different ways to encode the same info: `None` or
`Some(&[])`. Now there is only one way, `&[]`.
This commit is contained in:
Joshua Nelson 2021-02-14 11:31:35 -05:00
parent 9a1d6174c9
commit c583860126
3 changed files with 4 additions and 5 deletions

View File

@ -561,8 +561,7 @@ pub fn execute_cli(&self) {
self.run_step_descriptions(&Builder::get_step_descriptions(self.kind), &self.paths);
}
pub fn default_doc(&self, paths: Option<&[PathBuf]>) {
let paths = paths.unwrap_or(&[]);
pub fn default_doc(&self, paths: &[PathBuf]) {
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), paths);
}

View File

@ -68,7 +68,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
if !builder.config.docs {
return None;
}
builder.default_doc(None);
builder.default_doc(&[]);
let dest = "share/doc/rust/html";
@ -103,7 +103,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
if !builder.config.compiler_docs {
return None;
}
builder.default_doc(None);
builder.default_doc(&[]);
let mut tarball = Tarball::new(builder, "rustc-docs", &host.triple);
tarball.set_product_name("Rustc Documentation");

View File

@ -111,7 +111,7 @@ fn run(self, builder: &Builder<'_>) {
builder.info(&format!("Linkcheck ({})", host));
builder.default_doc(None);
builder.default_doc(&[]);
let _time = util::timeit(&builder);
try_run(