We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using .invert() on a Bitmap<SIZE> and then iterating over the indices, SIZE appears as an index. Minimal working example:
.invert()
Bitmap<SIZE>
SIZE
use bitmaps::{ Bitmap, }; fn main() { let mut my_map: Bitmap<4> = Bitmap::new(); my_map.set(0,true); my_map.set(2,true); println!("== TRUE ============="); for index in &my_map{ println!("index: {}", index); //println!("value: {}", my_map.get(index)); } my_map.invert(); println!("== FALSE ============"); for index in &my_map{ println!("index: {}", index); //println!("value: {}", my_map.get(index)); } }
Expected Output:
== TRUE ============= index: 0 index: 2 == FALSE ============ index: 1 index: 3
Actual Output:
== TRUE ============= index: 0 index: 2 == FALSE ============ index: 1 index: 3 index: 4
This becomes especially dramatic when you un-comment lines 12 and 19 as it results in the program panicking.
12
19
Cargo.toml:
[Dependencies] bitmaps = "3.2.0"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using
.invert()
on aBitmap<SIZE>
and then iterating over the indices,SIZE
appears as an index.Minimal working example:
Expected Output:
Actual Output:
This becomes especially dramatic when you un-comment lines
12
and19
as it results in the program panicking.Cargo.toml:
The text was updated successfully, but these errors were encountered: