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
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Deserialize, Serialize, Sequence)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum Direction {
|
||||
/// Move left (-x)
|
||||
#[serde(rename = "left")]
|
||||
Left,
|
||||
/// Move up (+y)
|
||||
#[serde(rename = "up")]
|
||||
Up,
|
||||
/// Move right (+x)
|
||||
#[serde(rename = "right")]
|
||||
Right,
|
||||
/// Move down (-y)
|
||||
#[serde(rename = "down")]
|
||||
Down,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user