Fix clippy::needless_borrow warning

```
warning: the borrowed expression implements the required traits
   --> tests/std.rs:311:29
    |
311 |             cmd.env("PATH", &p);
    |                             ^^ help: change this to: `p`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default
```
This commit is contained in:
Taiki Endo 2022-12-30 11:59:05 +09:00
parent 93be5c2506
commit 73f3f8f308
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ fn test_override_env() {
let mut cmd = env_cmd();
cmd.env_clear().env("RUN_TEST_NEW_ENV", "123");
if let Some(p) = env::var_os("PATH") {
cmd.env("PATH", &p);
cmd.env("PATH", p);
}
let result = cmd.output().await.unwrap();
let output = String::from_utf8_lossy(&result.stdout).to_string();