Skip to content

Commit

Permalink
Fix clippy::derivable_impls
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkriff committed Jun 9, 2023
1 parent d58e0a1 commit 5cb1e7c
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/core/battle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,14 @@ pub struct Id(i32);
#[derive(Serialize, Deserialize, Default, Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Strength(pub i32);

#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, PartialOrd)]
#[derive(Serialize, Deserialize, Default, Clone, Copy, Debug, PartialEq, PartialOrd)]
pub enum Weight {
#[default]
Normal = 0,

Heavy = 1,
Immovable = 2,
}

impl Default for Weight {
fn default() -> Self {
Weight::Normal
}
Immovable = 2,
}

impl fmt::Display for Weight {
Expand Down Expand Up @@ -132,14 +129,10 @@ pub struct Accuracy(pub i32);
#[derive(Serialize, Deserialize, Default, Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Dodge(pub i32);

#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, Eq)]
#[derive(Serialize, Deserialize, Default, Debug, Clone, Copy, PartialEq, Eq)]
pub enum TileType {
#[default]
Plain,
Rocks,
}

impl Default for TileType {
fn default() -> Self {
TileType::Plain
}
Rocks,
}

0 comments on commit 5cb1e7c

Please sign in to comment.