Skip to content

Commit f3f1163

Browse files
committed
Use isPressed instead of denoting type in function name
Discriminating factor is already done via the implementation type either Key or Scancode. I wrote this originally as a carbon copy from SFML. I think this change is healthy to make rust-sfml more "rusty" instead of "Cy-eeee" Pedantic change, but I think it is for the better.
1 parent da4caec commit f3f1163

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/window/keyboard.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ impl Key {
1010
/// pressed or released while no window was focused and no events were
1111
/// triggered.
1212
#[must_use]
13-
pub fn is_key_pressed(self) -> bool {
13+
pub fn is_pressed(self) -> bool {
1414
thread_safety::set_window_thread();
1515

1616
unsafe { ffi::sfKeyboard_isKeyPressed(self) }
@@ -30,7 +30,7 @@ impl Scancode {
3030
/// pressed or released while no window was focused and no events were
3131
/// triggered.
3232
#[must_use]
33-
pub fn is_scancode_pressed(self) -> bool {
33+
pub fn is_pressed(self) -> bool {
3434
thread_safety::set_window_thread();
3535
unsafe { ffi::sfKeyboard_isScancodePressed(self) }
3636
}

0 commit comments

Comments
 (0)