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

Silence rust clippy lint enabled after the 1.84 release #1359

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ version = "^0.11"
default-features = false
features = ["multi_thread"]

[features]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is ugly but it is the only way to make PyO3 0.22 work with Clippy. I will not bother opening a bug as the latest version already has a fix

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think this is fine as a temporary fix I had to do the same thing on qiskit recently too: Qiskit/qiskit#13645

default = []
# TODO: remove this once PyO3 is updated to 0.23. Currently, this is a bug in PyO3 0.22
# that leaks some of their features in a public macro. However, this was removed in 0.23.
gil-refs = ["pyo3/gil-refs"]

[profile.release]
lto = 'fat'
codegen-units = 1
1 change: 1 addition & 0 deletions rustworkx-core/src/dag_algo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ where
let mut v = *first;
let mut u: Option<G::NodeId> = None;
// Backtrack from this node to find the path
#[allow(clippy::unnecessary_map_or)]
while u.map_or(true, |u| u != v) {
path.push(v);
u = Some(v);
Expand Down
Loading