Export smol_str and impl Ord for Key

Fixes #2996.
This commit is contained in:
Diggory Hardy 2023-08-03 17:12:48 +01:00 committed by GitHub
parent b5aa96bea4
commit 189a0080a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -1019,6 +1019,13 @@ pub enum ElementState {
Released,
}
impl ElementState {
/// True if `self == Pressed`.
pub fn is_pressed(self) -> bool {
self == ElementState::Pressed
}
}
/// Describes a button of a mouse controller.
///
/// ## Platform-specific