Skip to content

Commit

Permalink
rename rustdoc, use asref path
Browse files Browse the repository at this point in the history
  • Loading branch information
5225225 committed Mar 27, 2024
1 parent ca63ee5 commit f8f3939
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/tools/run-make-support/src/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ use std::process::{Command, Output};

use crate::{add_host_rpath_env, handle_failed_output};

pub fn rustdoc() -> RustdocInvocationBuilder {
RustdocInvocationBuilder::new()
pub fn rustdoc() -> Rustdoc {
Rustdoc::new()
}

#[derive(Debug)]
pub struct RustdocInvocationBuilder {
pub struct Rustdoc {
cmd: Command,
}

impl RustdocInvocationBuilder {
impl Rustdoc {
fn new() -> Self {
let cmd = setup_common_rustdoc_build_cmd();
Self { cmd }
}

pub fn arg(&mut self, arg: &str) -> &mut RustdocInvocationBuilder {
pub fn arg(&mut self, arg: &str) -> &mut Rustdoc {
self.cmd.arg(arg);
self
}

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

pub fn env(&mut self, key: &str, value: &str) -> &mut RustdocInvocationBuilder {
pub fn env(&mut self, key: &str, value: &str) -> &mut Rustdoc {
self.cmd.env(key, value);
self
}
Expand Down

0 comments on commit f8f3939

Please sign in to comment.