Skip to content

Fix a few clippy lints in libtest#106398

Merged
bors merged 1 commit into
rust-lang:masterfrom
jyn514:fix-clippy
Jan 5, 2023
Merged

Fix a few clippy lints in libtest#106398
bors merged 1 commit into
rust-lang:masterfrom
jyn514:fix-clippy

Conversation

@jyn514

@jyn514 jyn514 commented Jan 3, 2023

Copy link
Copy Markdown
Member
  • Remove unnecessary references and dereferences
  • Use .contains instead of a <= x && x <= b
  • Use mem::take instead of mem::replace where possible

cc #106394 :)

@rustbot

rustbot commented Jan 3, 2023

Copy link
Copy Markdown
Collaborator

r? @thomcc

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

@jyn514

jyn514 commented Jan 3, 2023

Copy link
Copy Markdown
Member Author

@bors rollup

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 3, 2023
@rustbot

rustbot commented Jan 3, 2023

Copy link
Copy Markdown
Collaborator

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@kadiwa4

kadiwa4 commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

Clippy should ideally suggest methods like char::is_ascii_uppercase for those letter ranges

@jyn514

jyn514 commented Jan 3, 2023

Copy link
Copy Markdown
Member Author

ah good point - I can switch to using those APIs in libtest

- Remove unnecessary references and dereferences
- Use `.contains` instead of `a <= x && x <= b`
- Use `mem::take` instead of `mem::replace` where possible
@thomcc

thomcc commented Jan 4, 2023

Copy link
Copy Markdown
Member

These look fine to me.

@bors r+

@bors

bors commented Jan 4, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 3534e0a has been approved by thomcc

It is now in the queue for this repository.

@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 Jan 4, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#106391 (rustdoc: allow popover child links to work)
 - rust-lang#106398 (Fix a few clippy lints in libtest)
 - rust-lang#106412 (Fix link generation for local primitive types in rustdoc JSON output)
 - rust-lang#106437 (rustdoc: fix buggy JS check for absolute URL)
 - rust-lang#106451 (Merge borrowck permission checks)
 - rust-lang#106460 (Move tests)
 - rust-lang#106461 (docs: fix broken link "search bar")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5eb9698 into rust-lang:master Jan 5, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 5, 2023
@jyn514 jyn514 deleted the fix-clippy branch February 25, 2023 18:32
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants