From 424016de7f03e81cecb8a764860264816495b830 Mon Sep 17 00:00:00 2001 From: Kaisei Yokoyama Date: Sat, 6 Jun 2020 22:01:31 +0900 Subject: [PATCH] Derive Serialize and Deserialize for JoyConDeviceType --- Cargo.toml | 2 +- src/joycon/device.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 55ad2a1..02623f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "joycon-rs" -version = "0.6.0" +version = "0.6.1" authors = ["Kaisei Yokoyama "] repository = "https://github.com/KaiseiYokoyama/joycon-rs" edition = "2018" diff --git a/src/joycon/device.rs b/src/joycon/device.rs index 71bd06f..0c9be34 100644 --- a/src/joycon/device.rs +++ b/src/joycon/device.rs @@ -1,6 +1,7 @@ use super::*; use std::convert::TryInto; +#[cfg_attr(feature = "use_serde", derive(Serialize, Deserialize))] #[derive(Debug, Clone, Hash, Eq, PartialEq)] pub enum JoyConDeviceType { JoyConL = 0,