emoon / rust_minifb

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

Moved runtime color bounds checks to compile time #331

Closed StefanoIncardone closed 10 months ago

StefanoIncardone commented 10 months ago

made set_background_color function take u8 rgb values instead of usize and removed clamp function since it was only used to make sure that said usize color values were between 0 and 255, while u8 values are by definition guaranteed to be in that range

emoon commented 10 months ago

Thanks!