From 64f899703a7f9ffe471df9660105083e07f3f7de Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Thu, 31 Aug 2023 09:13:29 -0700 Subject: [PATCH] style: Address clippy lints due to rust 1.72.0 --- src/sys/flags.rs | 5 +++++ tests/test_trees.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sys/flags.rs b/src/sys/flags.rs index b7c3b32a..cc514c07 100644 --- a/src/sys/flags.rs +++ b/src/sys/flags.rs @@ -1,3 +1,8 @@ +// This allows us to pass lints with 1.72.0 +// until we bump bitflags to 2.x. +// (See GH issue #496) +#![allow(clippy::bad_bit_mask)] + use crate::sys::bindings as ll_bindings; use crate::RawFlags; use bitflags::bitflags; diff --git a/tests/test_trees.rs b/tests/test_trees.rs index 6b251484..a7da35a4 100644 --- a/tests/test_trees.rs +++ b/tests/test_trees.rs @@ -281,7 +281,7 @@ fn test_iterate_samples_two_trees() { let treeseq = treeseq_from_small_table_collection_two_trees(); assert_eq!(treeseq.num_trees(), 2); let mut tree_iter = treeseq.tree_iterator(TreeFlags::SAMPLE_LISTS).unwrap(); - let expected_number_of_roots = vec![2, 1]; + let expected_number_of_roots = [2, 1]; let mut expected_root_ids = vec![ vec![NodeId::from(0)], vec![NodeId::from(1), NodeId::from(0)],