Skip to content

Commit 1b53730

Browse files
committed
rename rustdoc, use asref path
1 parent 552eb4f commit 1b53730

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/tools/run-make-support/src/rustdoc.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ use std::process::{Command, Output};
44

55
use crate::{add_host_rpath_env, handle_failed_output};
66

7-
pub fn rustdoc() -> RustdocInvocationBuilder {
8-
RustdocInvocationBuilder::new()
7+
pub fn rustdoc() -> Rustdoc {
8+
Rustdoc::new()
99
}
1010

1111
#[derive(Debug)]
12-
pub struct RustdocInvocationBuilder {
12+
pub struct Rustdoc {
1313
cmd: Command,
1414
}
1515

16-
impl RustdocInvocationBuilder {
16+
impl Rustdoc {
1717
fn new() -> Self {
1818
let cmd = setup_common_rustdoc_build_cmd();
1919
Self { cmd }
2020
}
2121

22-
pub fn arg(&mut self, arg: &str) -> &mut RustdocInvocationBuilder {
22+
pub fn arg(&mut self, arg: &str) -> &mut Rustdoc {
2323
self.cmd.arg(arg);
2424
self
2525
}
2626

27-
pub fn arg_file(&mut self, arg: &Path) -> &mut RustdocInvocationBuilder {
28-
self.cmd.arg(arg);
27+
pub fn arg_file<P: AsRef<Path>>(&mut self, arg: P) -> &mut Rustdoc {
28+
self.cmd.arg(arg.as_ref());
2929
self
3030
}
3131

32-
pub fn env(&mut self, key: &str, value: &str) -> &mut RustdocInvocationBuilder {
32+
pub fn env(&mut self, key: &str, value: &str) -> &mut Rustdoc {
3333
self.cmd.env(key, value);
3434
self
3535
}

0 commit comments

Comments
 (0)