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

Clippy #12667

Merged
merged 6 commits into from
Sep 14, 2023
Merged

Clippy #12667

merged 6 commits into from
Sep 14, 2023

Conversation

Eh2406
Copy link
Contributor

@Eh2406 Eh2406 commented Sep 13, 2023

What does this PR try to resolve?

A few more small anti-patterns from our code base. Each in their own commit, found by turning on a clippy warning and manually reviewing the changes. Most of the changes are from switching to let-else.

How should we test and review this PR?

Internal refactoring and tests still pass.

Additional information

I know we don't like "fix clippy" PR's. Sorry.

On the other hand having reviewed for these lints, I wouldn't mind turning them to warn. 🤷

@rustbot
Copy link
Collaborator

rustbot commented Sep 13, 2023

r? @ehuss

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

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler A-build-scripts Area: build.rs scripts A-cfg-expr Area: Platform cfg expressions A-configuration Area: cargo config files and env vars A-console-output Area: Terminal output, colors, progress bar, etc. A-dependency-resolution Area: dependency resolution and the resolver A-directory-source Area: directory sources (vendoring) A-features2 Area: issues specifically related to the v2 feature resolver A-filesystem Area: issues with filesystems A-future-incompat Area: future incompatible reporting A-git Area: anything dealing with git A-interacts-with-crates.io Area: interaction with registries A-links Area: `links` native library links setting A-lockfile Area: Cargo.lock issues A-manifest Area: Cargo.toml issues A-profiles Area: profiles A-rebuild-detection Area: rebuild detection and fingerprinting A-registries Area: registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-timings Area: timings A-unstable Area: nightly unstable support A-workspaces Area: workspaces labels Sep 13, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Yes. We was like "hey we don't accept clippy PR". Given [lints] table is going to stabilized in 1.74 and to dogfood ourself with #12178 we inevitably need to adopt some clippy lints.

The pull request looks good, and agree that we can turn on some of them if there are improvements especially for performance.

@weihanglo
Copy link
Member

Anyway, thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

📌 Commit afe5333 has been approved by weihanglo

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 Sep 14, 2023
@bors
Copy link
Collaborator

bors commented Sep 14, 2023

⌛ Testing commit afe5333 with merge 39162c7...

bors added a commit that referenced this pull request Sep 14, 2023
Clippy

### What does this PR try to resolve?

A few more small anti-patterns from our code base. Each in their own commit, found by turning on a clippy warning and manually reviewing the changes. Most of the changes are from switching to `let-else`.

### How should we test and review this PR?

Internal refactoring and tests still pass.

### Additional information

I know we don't like "fix clippy" PR's. Sorry.

On the other hand having reviewed for these lints, I wouldn't mind turning them to warn. 🤷
@bors
Copy link
Collaborator

bors commented Sep 14, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 39162c7 to master...

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@weihanglo
Copy link
Member

@bors retry

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

⌛ Testing commit afe5333 with merge 80932be...

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 80932be to master...

@bors bors merged commit 80932be into rust-lang:master Sep 14, 2023
20 checks passed
@Eh2406 Eh2406 deleted the clippy branch September 14, 2023 18:33
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 15, 2023
Update cargo

11 commits in 2fc85d15a542bfb610aff7682073412cf635352f..d5336f813df39d476e61fc46daabb1446350660a
2023-09-09 01:49:46 +0000 to 2023-09-14 19:55:49 +0000
- fix: emit a warning for `credential-alias` shadowing (rust-lang/cargo#12671)
- refactor: fix lint errors in preparation of `[lints]` table integration (rust-lang/cargo#12669)
- Limit cargo add feature print (rust-lang/cargo#12662)
- Clippy (rust-lang/cargo#12667)
- Prerelease candidates error message (rust-lang/cargo#12659)
- Fix typos: `informations` -> `information` (rust-lang/cargo#12666)
- chore: update globset to 0.4.13 (rust-lang/cargo#12665)
- refactor: Consolidate clap/shell styles (rust-lang/cargo#12655)
- libgit2 fixed upstream (rust-lang/cargo#12657)
- Index summary enum (rust-lang/cargo#12643)
- feat(help): Add styling to help output (rust-lang/cargo#12578)

r? ghost
@ehuss ehuss added this to the 1.74.0 milestone Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler A-build-scripts Area: build.rs scripts A-cfg-expr Area: Platform cfg expressions A-configuration Area: cargo config files and env vars A-console-output Area: Terminal output, colors, progress bar, etc. A-dependency-resolution Area: dependency resolution and the resolver A-directory-source Area: directory sources (vendoring) A-features2 Area: issues specifically related to the v2 feature resolver A-filesystem Area: issues with filesystems A-future-incompat Area: future incompatible reporting A-git Area: anything dealing with git A-interacts-with-crates.io Area: interaction with registries A-links Area: `links` native library links setting A-lockfile Area: Cargo.lock issues A-manifest Area: Cargo.toml issues A-profiles Area: profiles A-rebuild-detection Area: rebuild detection and fingerprinting A-registries Area: registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-timings Area: timings A-unstable Area: nightly unstable support A-workspaces Area: workspaces Command-add Command-fix Command-generate-lockfile Command-package Command-pkgid Command-tree Command-yank 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.

5 participants