diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rs index a4c3df439564874ad10a553664bc6adeff78879d..72128e54345615e90b21782696105fb492bca575 100644 --- a/crates/ui2/src/components/keybinding.rs +++ b/crates/ui2/src/components/keybinding.rs @@ -45,7 +45,7 @@ impl Keybinding { .gap_1() .children(ModifierKey::iter().filter_map(|modifier| { if modifiers.0.contains(&modifier) { - Some(Key::new(modifier.glyph())) + Some(Key::new(modifier.glyph().to_string())) } else { None } @@ -58,14 +58,11 @@ impl Keybinding { #[derive(Element)] pub struct Key { state_type: PhantomData, - key: String, + key: SharedString, } impl Key { - pub fn new(key: K) -> Self - where - K: Into, - { + pub fn new(key: impl Into) -> Self { Self { state_type: PhantomData, key: key.into(),