From b7bb8100654087697b554affd03d2691190fd8ff Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 1 Apr 2021 10:34:13 -0400 Subject: [PATCH] clippy --- src/imgdata.rs | 12 ++++++------ src/model.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/imgdata.rs b/src/imgdata.rs index 05126ab..2a730c8 100644 --- a/src/imgdata.rs +++ b/src/imgdata.rs @@ -13,8 +13,8 @@ pub struct ThinGridData { impl Clone for ThinGridData { fn clone(&self) -> ThinGridData { ThinGridData { - width: self.width.clone(), - height: self.height.clone(), + width: self.width, + height: self.height, data: self.data.clone(), } } @@ -23,9 +23,9 @@ impl Clone for ThinGridData { impl ThinGridData { // Convert Grid to ThinGridData pub fn from_grid(in_grid: &Grid) -> Self { - return ThinGridData { - width: in_grid.width.clone(), - height: in_grid.height.clone(), + ThinGridData { + width: in_grid.width, + height: in_grid.height, data: in_grid.data.clone(), } } @@ -33,7 +33,7 @@ impl ThinGridData { #[allow(dead_code)] pub fn from_grid_vec(in_grids: Vec) -> Vec { return in_grids.iter().map(|grid|{ - return Self::from_grid(grid); + Self::from_grid(grid) }).collect(); } diff --git a/src/model.rs b/src/model.rs index 9b0c1b2..b9576c0 100644 --- a/src/model.rs +++ b/src/model.rs @@ -174,7 +174,7 @@ impl Model { fn strip_grid_data(grids: Vec) -> Vec { return grids.iter().map(|grid| { - return ThinGridData::from_grid(grid); + ThinGridData::from_grid(grid) }).collect(); }