Skip to content

Commit c583860

Browse files
committed
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, `&[]`.
1 parent 9a1d617 commit c583860

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/bootstrap/builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,7 @@ impl<'a> Builder<'a> {
561561
self.run_step_descriptions(&Builder::get_step_descriptions(self.kind), &self.paths);
562562
}
563563

564-
pub fn default_doc(&self, paths: Option<&[PathBuf]>) {
565-
let paths = paths.unwrap_or(&[]);
564+
pub fn default_doc(&self, paths: &[PathBuf]) {
566565
self.run_step_descriptions(&Builder::get_step_descriptions(Kind::Doc), paths);
567566
}
568567

src/bootstrap/dist.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Step for Docs {
6868
if !builder.config.docs {
6969
return None;
7070
}
71-
builder.default_doc(None);
71+
builder.default_doc(&[]);
7272

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

@@ -103,7 +103,7 @@ impl Step for RustcDocs {
103103
if !builder.config.compiler_docs {
104104
return None;
105105
}
106-
builder.default_doc(None);
106+
builder.default_doc(&[]);
107107

108108
let mut tarball = Tarball::new(builder, "rustc-docs", &host.triple);
109109
tarball.set_product_name("Rustc Documentation");

src/bootstrap/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Step for Linkcheck {
111111

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

114-
builder.default_doc(None);
114+
builder.default_doc(&[]);
115115

116116
let _time = util::timeit(&builder);
117117
try_run(

0 commit comments

Comments
 (0)