emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.04k stars 99 forks source link

Improved code consistency and formatting #332

Closed StefanoIncardone closed 10 months ago

StefanoIncardone commented 10 months ago

Added inline directives where it made sense and based on previous usage, namely implementation such as Window and Menu. Moved freestanding functions inside impl blocks, thus deleting files with a single function definition, these were functions were the first argument could be changed with a "self". These functions were made sure to be marked as pub(crate) so not to leak them into the public interface of the crate. Possibly found bug/typo in os/posix/wayland.rs is_key_released function.

emoon commented 10 months ago

Thanks! I thought about doing a few of these changes before, but never got around to it :)

StefanoIncardone commented 10 months ago

Happy to help where possible :)

I also wanted to bring your attention to the possible bug/typo i found in is_key_released

Lastly i noticed that redox and wasm are not mentioned in the CI, as i noticed i made a mistake in os/redox/mod.rs and in os/wasm/mod.rs but went unnoticed