Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't use .into() to convert types into identical types. #69529

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

matthiaskrgr
Copy link
Member

This removes redundant .into() calls.

example: let s: String = format!("hello").into();

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

r? @Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Feb 27, 2020

📌 Commit 97710b4afb132c9a9c7f2818ccdb544ee59cc976 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2020
Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only had one nit (due to let-binding, which most of these don't do).
cc @alexcrichton @Mark-Simulacrum for the libstd changes
cc @oli-obk @RalfJung for the miri changes

EDIT: whoops, too late!

src/libstd/sys/unix/process/process_common.rs Outdated Show resolved Hide resolved
@matthiaskrgr matthiaskrgr force-pushed the clippy_identity_conversion branch 2 times, most recently from 6a701ed to 3530b9a Compare February 27, 2020 22:30
@matthiaskrgr
Copy link
Member Author

reverted some changes to src/libstd/sys_common/process.rs

Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miri changes LGTM

example:
    let s: String = format!("hello").into();
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 27, 2020

📌 Commit 7be94a8 has been approved by Mark-Simulacrum

bors added a commit that referenced this pull request Feb 28, 2020
Rollup of 9 pull requests

Successful merges:

 - #69379 (Fail on multiple declarations of `main`.)
 - #69430 (librustc_typeck: remove loop that never actually loops)
 - #69449 (Do not ping PR reviewers in toolstate breakage)
 - #69491 (rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messages)
 - #69495 (don't take redundant references to operands)
 - #69496 (use find(x) instead of filter(x).next())
 - #69501 (note that find(f) is equivalent to filter(f).next() in the docs.)
 - #69527 (Ignore untracked paths when running `rustfmt` on repository.)
 - #69529 (don't use .into() to convert types into identical types.)

Failed merges:

r? @ghost
@bors bors merged commit 02b96b3 into rust-lang:master Feb 28, 2020
@matthiaskrgr matthiaskrgr deleted the clippy_identity_conversion branch February 29, 2020 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants