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

style: fix Rust 1.75 lints #291

Merged
merged 6 commits into from
Jan 9, 2024
Merged

style: fix Rust 1.75 lints #291

merged 6 commits into from
Jan 9, 2024

Conversation

morrisonlevi
Copy link
Contributor

@morrisonlevi morrisonlevi commented Jan 5, 2024

What does this PR do?

This fixes a series of lints that now show up due to Rust 1.75's release.

Motivation

I opened a PR for something else and notice the lints failed.

Additional Notes

cargo clippy --fix --lib is pretty nice, but I still had to resolve two things by hand.

PROF-8862

How to test the change?

Everything should work the same. Locally, all tests still passed.

For Reviewers

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

@github-actions github-actions bot added profiling Relates to the profiling* modules. mini-agent sidecar labels Jan 5, 2024
Copy link

github-actions bot commented Jan 5, 2024

Some tests with 'continue-on-error: true' have failed:

  • Verify trace-protobuf stats_proto

Created by continue-on-error-comment

@morrisonlevi morrisonlevi marked this pull request as ready for review January 5, 2024 22:54
@morrisonlevi morrisonlevi requested review from a team as code owners January 5, 2024 22:54
@@ -1,7 +1,6 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2023-Present Datadog, Inc.

#[cfg(test)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you remove this cfg?

Copy link
Contributor Author

@morrisonlevi morrisonlevi Jan 8, 2024

Choose a reason for hiding this comment

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

The includes are guarded by cfg(test) instead. This fixes unused import warnings in non-test. Having both cfgs seemed pointlessly redundant.

@morrisonlevi morrisonlevi merged commit 13187a1 into main Jan 9, 2024
20 checks passed
@morrisonlevi morrisonlevi deleted the levi/clippy-2024-01-05 branch January 9, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mini-agent profiling Relates to the profiling* modules. sidecar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants