Skip to content

Commit

Permalink
Rollup merge of #82106 - jyn514:cleanup-bootstrap, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Remove unnecessary `Option` in `default_doc`

Previously, there were two different ways to encode the same info: `None` or
`Some(&[])`. Now there is only one way, `&[]`.
  • Loading branch information
jonas-schievink authored Feb 15, 2021
2 parents db5ae6a + c583860 commit 40d85a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,7 @@ impl<'a> Builder<'a> {
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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl Step for Docs {
if !builder.config.docs {
return None;
}
builder.default_doc(None);
builder.default_doc(&[]);

let dest = "share/doc/rust/html";

Expand Down Expand Up @@ -103,7 +103,7 @@ impl Step for RustcDocs {
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");
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl Step for Linkcheck {

builder.info(&format!("Linkcheck ({})", host));

builder.default_doc(None);
builder.default_doc(&[]);

let _time = util::timeit(&builder);
try_run(
Expand Down

0 comments on commit 40d85a5

Please sign in to comment.