Skip to content

Commit

Permalink
clippy v1
Browse files Browse the repository at this point in the history
  • Loading branch information
actioninja committed Mar 23, 2023
1 parent c4f5e5f commit b78ad5c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions hypnagogic_core/src/config/blocks/cutters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ impl Default for IconSize {
}
}

#[derive(Copy, Clone, Eq, PartialEq, Debug, Serialize, Deserialize)]
#[derive(Copy, Clone, Eq, PartialEq, Debug, Serialize, Deserialize, Default)]
pub struct OutputIconPosition {
pub x: u32,
pub y: u32,
}

impl Default for OutputIconPosition {
fn default() -> Self {
Self { x: 0, y: 0 }
}
}

#[derive(Copy, Clone, Eq, PartialEq, Debug, Serialize, Deserialize)]
pub struct OutputIconSize {
pub x: u32,
Expand Down Expand Up @@ -57,7 +51,7 @@ pub struct Positions(pub Map<CornerType, u32>);
impl Positions {
#[must_use]
pub fn get(&self, key: CornerType) -> Option<u32> {
self.0.get(key).map(|x| *x)
self.0.get(key).copied()
}
}

Expand Down Expand Up @@ -196,7 +190,7 @@ pub struct SlicePoint(pub Map<Side, u32>);

impl SlicePoint {
pub fn get(&self, key: Side) -> Option<u32> {
self.0.get(key).map(|x| *x)
self.0.get(key).copied()
}
}

Expand Down

0 comments on commit b78ad5c

Please sign in to comment.