Open PerfectlyFineCode opened 1 year ago
Hi!
I stumbled upon this interesting detail that get_key_pressed is mutable, which means it breaks some behaviors. get_gamepad_button_pressed isn't mutable, so why is get_key_pressed?
get_key_pressed
get_gamepad_button_pressed
I made an extended function which calls exactly the same thing and it doesn't need to be mutable at all. Code of said issue: https://github.com/deltaphc/raylib-rs/blob/master/raylib/src/core/input.rs#L36 where it is a mutable reference to self, as no mutability is required. This can be removed.
Hi!
I stumbled upon this interesting detail that
get_key_pressed
is mutable, which means it breaks some behaviors.get_gamepad_button_pressed
isn't mutable, so why isget_key_pressed
?I made an extended function which calls exactly the same thing and it doesn't need to be mutable at all. Code of said issue: https://github.com/deltaphc/raylib-rs/blob/master/raylib/src/core/input.rs#L36 where it is a mutable reference to self, as no mutability is required. This can be removed.