diff options
| author | Gaspard Culis <79080828+GaspardCulis@users.noreply.github.com> | 2024-12-12 22:13:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-12 15:13:16 -0600 |
| commit | 1f06a1540f46d8087907566d7c6c1ab397c517ec (patch) | |
| tree | c919d8bb9bda49c5a4242da28d7b2021dc93e7fd | |
| parent | e9136c9cbbf9010b8352127e129c1cd290f377bd (diff) | |
| download | azalea-drasl-1f06a1540f46d8087907566d7c6c1ab397c517ec.tar.xz | |
chore(core): Derive Serialize and Deserialize for `direction` types (#197)
When crate's `serde` feature is enabled
| -rwxr-xr-x | azalea-core/src/direction.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/azalea-core/src/direction.rs b/azalea-core/src/direction.rs index b0b8c960..aa537858 100755 --- a/azalea-core/src/direction.rs +++ b/azalea-core/src/direction.rs @@ -3,6 +3,7 @@ use azalea_buf::AzBuf; use crate::position::Vec3; #[derive(Clone, Copy, Debug, AzBuf, Default, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum Direction { #[default] Down = 0, @@ -63,6 +64,7 @@ impl Direction { // TODO: make azalea_block use this instead of FacingCardinal #[derive(Clone, Copy, Debug, AzBuf, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum CardinalDirection { North, South, |
