Skip to content

Commit 5d992ed

Browse files
IvanIsCodingSILIZ4
authored andcommitted
Silence rust clippy lint enabled after the 1.84 release (Qiskit#1359)
* Silence rust clippy lint enabled after the 1.84 release * Define gil-refs feature for the sake of clippy
1 parent ae8f6ca commit 5d992ed

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ version = "^0.11"
7171
default-features = false
7272
features = ["multi_thread"]
7373

74+
[features]
75+
default = []
76+
# TODO: remove this once PyO3 is updated to 0.23. Currently, this is a bug in PyO3 0.22
77+
# that leaks some of their features in a public macro. However, this was removed in 0.23.
78+
gil-refs = ["pyo3/gil-refs"]
79+
7480
[profile.release]
7581
lto = 'fat'
7682
codegen-units = 1

rustworkx-core/src/dag_algo.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ where
326326
let mut v = *first;
327327
let mut u: Option<G::NodeId> = None;
328328
// Backtrack from this node to find the path
329+
#[allow(clippy::unnecessary_map_or)]
329330
while u.map_or(true, |u| u != v) {
330331
path.push(v);
331332
u = Some(v);

0 commit comments

Comments
 (0)