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 nightly clippy warnings #817

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

zbirenbaum
Copy link
Contributor

@zbirenbaum zbirenbaum commented Mar 29, 2024

Implements suggested performance refactors and prevents future clippy warnings.

Description

Using clippy for the nightly rust toolchain is currently showing warnings in a number of spots. This implements the suggested changes so that all builds will not suddenly start failing if the toolchain version used by precommit-hooks is updated.

  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

Using clippy for the nightly rust toolchain is currently warnings
in a number of spots. This implements the suggested changes so
that all builds will not suddenly start failing if the toolchain
version used by precommit-hooks is updated.
Copy link
Contributor Author

@zbirenbaum zbirenbaum left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04, and 1 discussions need to be resolved


-- commits line 1 at r1:
As a side note, there is a similar issue with cargo fmt. Sometimes, cargo +nightly fmt will not change anything, and the precommit hooks will fail since cargo +stable fmt does change some things.

I was under the impression that bazel test //... is supposed to use the nightly version of rust but it seems that is currently not the case.

Copy link

Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: 1 of 1 LGTMs obtained, and 1 discussions need to be resolved

@zbirenbaum zbirenbaum merged commit 6d87cca into TraceMachina:main Apr 1, 2024
26 checks passed
@zbirenbaum zbirenbaum deleted the fix-nightly-clippy branch April 1, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants