diff --git a/rustworkx-core/src/centrality.rs b/rustworkx-core/src/centrality.rs index c099c6304..2d856244f 100644 --- a/rustworkx-core/src/centrality.rs +++ b/rustworkx-core/src/centrality.rs @@ -738,7 +738,7 @@ where { let alpha: f64 = alpha.unwrap_or(0.1); - let mut beta: HashMap = beta_map.unwrap_or_else(HashMap::new); + let mut beta: HashMap = beta_map.unwrap_or_default(); if beta.is_empty() { // beta_map was none diff --git a/src/dag_algo/mod.rs b/src/dag_algo/mod.rs index 7a21d5b92..df61a7378 100644 --- a/src/dag_algo/mod.rs +++ b/src/dag_algo/mod.rs @@ -623,7 +623,6 @@ pub fn collect_bicolor_runs( } } else { for color in colors { - let color = color; ensure_vector_has_index!(pending_list, block_id, color); if let Some(color_block_id) = block_id[color] { block_list[color_block_id].append(&mut pending_list[color]); diff --git a/src/matching/mod.rs b/src/matching/mod.rs index fac47e973..af9740ad9 100644 --- a/src/matching/mod.rs +++ b/src/matching/mod.rs @@ -92,7 +92,7 @@ fn _inner_is_matching(graph: &graph::PyGraph, matching: &HashSet<(usize, usize)> .contains_edge(NodeIndex::new(e.0), NodeIndex::new(e.1)) }; - if !matching.iter().all(|e| has_edge(e)) { + if !matching.iter().all(has_edge) { return false; } let mut found: HashSet = HashSet::with_capacity(2 * matching.len()); diff --git a/src/score.rs b/src/score.rs index 4dc888c5b..95e0d5bea 100644 --- a/src/score.rs +++ b/src/score.rs @@ -10,6 +10,7 @@ // License for the specific language governing permissions and limitations // under the License. #![allow(clippy::derive_partial_eq_without_eq)] +#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)] use std::cmp::Ordering; use std::ops::{Add, AddAssign};