From 03f5a351c37dbe1b0a286583e620d1cf074f1b91 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 16 Jan 2024 13:31:02 +0100 Subject: Use `SmolStr` for `text` field in `KeyPressed` event --- core/src/keyboard/event.rs | 3 ++- core/src/keyboard/key.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'core/src/keyboard') diff --git a/core/src/keyboard/event.rs b/core/src/keyboard/event.rs index b1792415..1eb42334 100644 --- a/core/src/keyboard/event.rs +++ b/core/src/keyboard/event.rs @@ -1,4 +1,5 @@ use crate::keyboard::{Key, Location, Modifiers}; +use crate::SmolStr; /// A keyboard event. /// @@ -20,7 +21,7 @@ pub enum Event { modifiers: Modifiers, /// The text produced by the key press, if any. - text: Option, + text: Option, }, /// A keyboard key was released. diff --git a/core/src/keyboard/key.rs b/core/src/keyboard/key.rs index ef48dae4..dbde5196 100644 --- a/core/src/keyboard/key.rs +++ b/core/src/keyboard/key.rs @@ -1,5 +1,5 @@ //! Identify keyboard keys. -use smol_str::SmolStr; +use crate::SmolStr; /// A key on the keyboard. /// -- cgit