From 91e5ce3bbb2abe5b5c816e03423d42f1b53b99e5 Mon Sep 17 00:00:00 2001 From: Sergio Ribera Date: Fri, 3 Nov 2023 00:13:21 -0400 Subject: [PATCH 1/2] fix: rename serialize feature by serde --- Cargo.toml | 6 +++--- README.md | 6 +++--- src/behaviour.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9074ab3..3dec577 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,9 +21,9 @@ name = "multiple" required-features = ["inspect"] [features] -default = ["serialize"] +default = ["serde"] inspect = ["bevy-inspector-egui"] -serialize = ["serde"] +serde = ["dep:serde"] [dependencies] bevy = { version = "0.11", default-features = false, features = [ @@ -34,4 +34,4 @@ bevy-inspector-egui = { version = "0.19", optional = true } serde = { version = "^1", features = ["derive"], optional = true } [dev-dependencies] -bevy = "0.11" \ No newline at end of file +bevy = "0.11" diff --git a/README.md b/README.md index c9e115a..b44a27a 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,13 @@ Aviable and compatible versions # Features - inspect: for world inspect with egui inspector -- serialize (default): for serialization support for all types (usable for save and load settings) +- serde (default): for serialization support for all types (usable for save and load settings) ```toml virtual_joystick = { version = "*", default-features = false, - features = [ "inspect", "serialize" ] + features = [ "inspect", "serde" ] } ``` @@ -66,7 +66,7 @@ cargo run --example simple -F=inspect Add to Cargo.toml ```toml [dependencies] -bevy = "0.10.1" +bevy = "0.11" virtual_joystick = "*" # Add your version ``` diff --git a/src/behaviour.rs b/src/behaviour.rs index 3fbe95f..55cbb3a 100644 --- a/src/behaviour.rs +++ b/src/behaviour.rs @@ -2,12 +2,12 @@ use bevy::prelude::*; #[cfg(feature = "inspect")] use bevy_inspector_egui::prelude::*; -#[cfg(feature = "serialize")] +#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; #[derive(Reflect, Clone, Copy, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "inspect", derive(InspectorOptions))] -#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "inspect", reflect(InspectorOptions))] pub enum VirtualJoystickAxis { #[default] @@ -40,7 +40,7 @@ impl VirtualJoystickAxis { #[derive(Reflect, Clone, Copy, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "inspect", derive(InspectorOptions))] -#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "inspect", reflect(InspectorOptions))] pub enum VirtualJoystickType { /// Static position From 4f06a6ce7ee04dd6b9f856d3fb11001e24179a47 Mon Sep 17 00:00:00 2001 From: Sergio Ribera Date: Fri, 3 Nov 2023 00:17:44 -0400 Subject: [PATCH 2/2] docs: add url to serde --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b44a27a..8c12673 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Aviable and compatible versions # Features - inspect: for world inspect with egui inspector -- serde (default): for serialization support for all types (usable for save and load settings) +- [`serde`](https://serde.rs) (default): for serialization support for all types (usable for save and load settings) ```toml virtual_joystick = {