Skip to content

mpz-memory: first check if allocated, then if set #265

@themighty1

Description

@themighty1

Currently the VisibilityView API allow this test to pass

#[test]
    fn test() {
        let mut view = VisibilityView::new();
        view.alloc(10);
        assert!(view.is_set(20..30));
    }

It obviously shouldn't pass since the range 20..30 was not allocated.

Is the caller responsible for passing only the ranges which were allocated or is this a bug that needs fixing @sinui0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions