Skip to content

Commit

Permalink
iced_core: feature for serde serialization of KeyCode
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 authored and wash2 committed Nov 9, 2023
1 parent b98c0f2 commit 37ec2a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/c
version = "0.7"
optional = true

[dependencies.serde]
version = "1"
optional = true
features = ["serde_derive"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = "0.1"

Expand Down
1 change: 1 addition & 0 deletions core/src/keyboard/key_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
///
/// [`winit`]: https://docs.rs/winit/0.20.0-alpha3/winit/
#[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[repr(u32)]
#[allow(missing_docs)]
pub enum KeyCode {
Expand Down

0 comments on commit 37ec2a2

Please sign in to comment.