Skip to content

use bitmasks instead of pure enums where appropriate #675

@rursprung

Description

@rursprung

i just ran into this with: MouseEventFlags: in most cases the flags parameter will be set to 0 in the callback triggered by highgui::set_mouse_callback. but 0 is not a valid value according to the enum, thus try_from will return an Err.

using something like bitmask-enum (i've never personally used this crate directly) might resolve this, as it'd also correctly allow setting multiple flags at the same time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions