Skip to content

avoid full-slicing slices - #82163

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:slice
Feb 16, 2021
Merged

avoid full-slicing slices#82163
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:slice

Conversation

@matthiaskrgr

Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 15, 2021
@jyn514

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Feb 16, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 4390a61 has been approved by jyn514

@borsbors 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
@jyn514jyn514 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
@lcnrlcnr assigned jyn514 and unassigned lcnrFeb 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:masterFeb 16, 2021
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@matthiaskrgr@rust-highfive@jyn514@bors@lcnr@rustbot