Skip to content

Chore: fix cargo clippy warnings#186

Open
funny0facer wants to merge 2 commits intozesterer:masterfrom
funny0facer:clippy
Open

Chore: fix cargo clippy warnings#186
funny0facer wants to merge 2 commits intozesterer:masterfrom
funny0facer:clippy

Conversation

@funny0facer
Copy link
Contributor

I ran cargo clippy and got some warnings. Those were removed with the first commit.
After that, I checked if there were any #[allow] sections. => Therefore I replaced the deprecated spin_loop with the newer upstream solution.

Copy link
Owner

@zesterer zesterer left a comment

Choose a reason for hiding this comment

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

Thanks, just one comment.

Comment on lines -26 to -28
// Use the deprecated spin_loop_hint() to ensure that we don't get
// a higher MSRV than we need to.
#[allow(deprecated)]
Copy link
Owner

Choose a reason for hiding this comment

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

Have you checked that this no longer applies with our MSRV?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure what you mean.

From our Cargo.toml: rust-version = "1.71"

hint::spin_loop() is in rust since 1.49.0 (https://doc.rust-lang.org/src/core/hint.rs.html#268-295) and spin_loop_hint() is deprecated since 1.51.0 (https://doc.rust-lang.org/src/core/sync/atomic.rs.html#4608-4613)

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