Remove redundant double call .to_string() - #17286
Merged
Merged
Conversation
Collaborator
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
Author
|
Could someone please re-start the CI run? I believe the failures are unrelated to this one-line change. |
ranger-ross
approved these changes
Jul 31, 2026
ranger-ross
enabled auto-merge
July 31, 2026 16:52
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Aug 5, 2026
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Aug 6, 2026
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
pull Bot
pushed a commit
to LeeeeeeM/miri
that referenced
this pull request
Aug 8, 2026
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
github-actions Bot
pushed a commit
to rust-lang/stdarch
that referenced
this pull request
Aug 10, 2026
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Aug 10, 2026
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In src/ops/cargo_new.rs at line 1044, there's a redundant double .to_string() call:
Fix
Remove extra .to_string()
Test
Single-line change with no behavioral difference. Existing test cover the code path.