diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-28 01:55:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-28 01:55:49 +0100 |
| commit | 02b96b3ecc48dc5245e425fc248163cfaae9643e (patch) | |
| tree | bad29616a580bcc720dcbedc94715e30ee89ba01 /src/libstd/sys | |
| parent | 4c9e44fc5f2958706fb747d7ccf4d49f1f384545 (diff) | |
| parent | 7be94a8a958750cf57c0fa41ad7797a2cd1630de (diff) | |
| download | rust-02b96b3ecc48dc5245e425fc248163cfaae9643e.tar.gz rust-02b96b3ecc48dc5245e425fc248163cfaae9643e.zip | |
Rollup merge of #69529 - matthiaskrgr:clippy_identity_conversion, r=Mark-Simulacrum
don't use .into() to convert types into identical types.
This removes redundant `.into()` calls.
example: `let s: String = format!("hello").into();`
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/process/process_common.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/process/process_common.rs b/src/libstd/sys/unix/process/process_common.rs index e66d6fdc56a..83f052c898b 100644 --- a/src/libstd/sys/unix/process/process_common.rs +++ b/src/libstd/sys/unix/process/process_common.rs @@ -287,9 +287,7 @@ impl CStringArray { fn construct_envp(env: BTreeMap<OsString, OsString>, saw_nul: &mut bool) -> CStringArray { let mut result = CStringArray::with_capacity(env.len()); - for (k, v) in env { - let mut k: OsString = k.into(); - + for (mut k, v) in env { // Reserve additional space for '=' and null terminator k.reserve_exact(v.len() + 2); k.push("="); |
