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

avoid full-slicing slices #82163

Merged
merged 1 commit into from
Feb 16, 2021
Merged

avoid full-slicing slices #82163

merged 1 commit into from
Feb 16, 2021

Conversation

matthiaskrgr
Copy link
Member

If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing

If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
@rust-highfive
Copy link
Collaborator

r? @lcnr

(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 15, 2021
@jyn514
Copy link
Member

jyn514 commented Feb 16, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 16, 2021

📌 Commit 4390a61 has been approved by jyn514

@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 16, 2021
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 16, 2021
@lcnr lcnr assigned jyn514 and unassigned lcnr Feb 16, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 16, 2021
avoid full-slicing slices

If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 16, 2021
avoid full-slicing slices

If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2021
…laumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#82145 (Fix ES5 errors (IE11))
 - rust-lang#82160 (Fix typo in rustc_infer::infer::UndoLog)
 - rust-lang#82161 (Add long explanation for E0545)
 - rust-lang#82163 (avoid full-slicing slices)
 - rust-lang#82175 (validation: fix invalid-fn-ptr error message)
 - rust-lang#82184 ([Minor] Update discriminant_value docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 46b93b2 into rust-lang:master Feb 16, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 16, 2021
@matthiaskrgr matthiaskrgr deleted the slice branch January 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants