petgraph / fixedbitset

A simple bitset container for Rust
https://docs.rs/fixedbitset/
Apache License 2.0
127 stars 47 forks source link

Account for when the lhs of `difference_count` has a greater length than the lhs #131

Open SkiFire13 opened 2 months ago

SkiFire13 commented 2 months ago

zip truncates the length of the iterator to the shortest of the two, but this is incorrect for difference_count since that might ignore some bits in the tail of the lhs that should be present in the difference. The solution is to include a sum of those. The test for difference was also extended with a case that would trigger this issue.