Skip to content

BitSet.bitand operation returns non-empty BitSetAnd even if no ids match. #51

@prixt

Description

@prixt

Code:

use hibitset::*;

fn main() {
    let mut a = BitSet::new();
    let mut b = BitSet::new();
    assert!( a.is_empty() && b.is_empty(), "This shouldn't happen!");
    a.add(0);
    b.add(10);
    assert!( !a.is_empty() && !b.is_empty(), "This also shouldn't happen!");
    assert!( (a&b).is_empty(), "This definetely shouldn't happen!");
}

Output:

thread 'main' panicked at 'This definetely shouldn't happen!', src\main.rs:10:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: process didn't exit successfully: `target\debug\rust-test.exe` (exit code: 101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions