Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Potential module refactors #43

@FenrirWolf

Description

@FenrirWolf

The HID module isn't the only one that's in need of some love.

For example, I believe the current console API is technically unsound, since there are no guards on the values you can pass to set_window and I can't image good things happening when you exceed their proper limits. Not that resizing the console is an often used operation in the first place, but we still like safe APIs. I figure that changing console construction to a builder pattern (with convenience functions for default and full-screen consoles) and having the finished console window be structurally immutable would fix that.

I'm also thinking of changing the Error type from an enum to a struct, since I don't imagine that Error will ever be anything more than a newtype'd i32, and structs are more commonly used than enums for that pattern. Feel free to check me on that one though.

Are there any others modules that should be given a second pass? And how aggressive should we be with breaking existing code? My opinion is that we might as well be fairly aggressive, given that everything about this is already unstable to begin with and it's not like there's a huge install base either.

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