diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2021-07-02 11:10:00 +0200 |
|---|---|---|
| committer | Konrad Borowski <konrad@borowski.pw> | 2021-07-02 11:14:42 +0200 |
| commit | 18715c0753701df29a91c1bf7fb2d010a2a92cd5 (patch) | |
| tree | bcbef958f582c9f0d653cfaa4b3ec7d574b9d35f /library/std/src | |
| parent | 81c1d7a1506e5f4bcc5f12fb49f3b6e9bb87c605 (diff) | |
| download | rust-18715c0753701df29a91c1bf7fb2d010a2a92cd5.tar.gz rust-18715c0753701df29a91c1bf7fb2d010a2a92cd5.zip | |
Remove & from Command::args calls in documentation
Now that arrays implement `IntoIterator`, using `&` is no longer necessary. This makes examples easier to understand.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/process.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs index f9cfd11e906..c433e74faf3 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -451,7 +451,7 @@ impl fmt::Debug for ChildStderr { /// /// 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 @@ impl Command { /// use std::process::Command; /// /// Command::new("ls") - /// .args(&["-l", "-a"]) + /// .args(["-l", "-a"]) /// .spawn() /// .expect("ls command failed to start"); /// ``` |
