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

Fix build errors with Rust 1.73.0 #996

Merged
merged 1 commit into from
Oct 5, 2023
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
2 changes: 1 addition & 1 deletion rustworkx-core/src/centrality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ where
{
let alpha: f64 = alpha.unwrap_or(0.1);

let mut beta: HashMap<usize, f64> = beta_map.unwrap_or_else(HashMap::new);
let mut beta: HashMap<usize, f64> = beta_map.unwrap_or_default();

if beta.is_empty() {
// beta_map was none
Expand Down
1 change: 0 additions & 1 deletion src/dag_algo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,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]);
Expand Down
2 changes: 1 addition & 1 deletion src/matching/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<usize> = HashSet::with_capacity(2 * matching.len());
Expand Down
1 change: 1 addition & 0 deletions src/score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down