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:
parent
9a1d6174c9
commit
c583860126
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user