Skip to content

Use NonZeroU32 as the backing type for Keysym #13

@notgull

Description

@notgull

X11 generally uses the NO_KEYSYM value, as alias for zero, to denote that a keysym is not present. Therefore it would make sense to use a NonZeroU32 as the backing type for the Keysym type instead of u32. This way, for Option<Keysym> there is no ambiguity between None and Some(NO_KEYSYM).

Cons:

  • There may be a necessary difference between None and Some(NO_KEYSYM).
  • Requires raising the MSRV to 1.57 (although most of the windowing ecosystem is past that already so I wouldn't mind).

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