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

Fix a few clippy lints in libtest #106398

Merged
merged 1 commit into from
Jan 5, 2023
Merged

Fix a few clippy lints in libtest #106398

merged 1 commit into from
Jan 5, 2023

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 3, 2023

  • 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
Copy link
Collaborator

rustbot commented Jan 3, 2023

r? @thomcc

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

@jyn514
Copy link
Member Author

jyn514 commented Jan 3, 2023

@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
Copy link
Collaborator

rustbot commented Jan 3, 2023

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

kadiwa4 commented Jan 3, 2023

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

@jyn514
Copy link
Member Author

jyn514 commented Jan 3, 2023

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
Copy link
Member

thomcc commented Jan 4, 2023

These look fine to me.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2023

📌 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