use serdes rename_all
This commit is contained in:
parent
27d60845b5
commit
157ea2aaad
@ -16,18 +16,15 @@ mod logic;
|
|||||||
// See https://docs.battlesnake.com/api
|
// See https://docs.battlesnake.com/api
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Deserialize, Serialize, Sequence)]
|
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Deserialize, Serialize, Sequence)]
|
||||||
|
#[serde(rename_all = "lowercase")]
|
||||||
pub enum Direction {
|
pub enum Direction {
|
||||||
/// Move left (-x)
|
/// Move left (-x)
|
||||||
#[serde(rename = "left")]
|
|
||||||
Left,
|
Left,
|
||||||
/// Move up (+y)
|
/// Move up (+y)
|
||||||
#[serde(rename = "up")]
|
|
||||||
Up,
|
Up,
|
||||||
/// Move right (+x)
|
/// Move right (+x)
|
||||||
#[serde(rename = "right")]
|
|
||||||
Right,
|
Right,
|
||||||
/// Move down (-y)
|
/// Move down (-y)
|
||||||
#[serde(rename = "down")]
|
|
||||||
Down,
|
Down,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user