diff --git a/library/std/src/process.rs b/library/std/src/process.rs index f9cfd11e9065..c433e74faf3e 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -451,7 +451,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { /// /// let output = if cfg!(target_os = "windows") { /// Command::new("cmd") -/// .args(&["/C", "echo hello"]) +/// .args(["/C", "echo hello"]) /// .output() /// .expect("failed to execute process") /// } else { @@ -608,7 +608,7 @@ pub fn arg>(&mut self, arg: S) -> &mut Command { /// use std::process::Command; /// /// Command::new("ls") - /// .args(&["-l", "-a"]) + /// .args(["-l", "-a"]) /// .spawn() /// .expect("ls command failed to start"); /// ```