diff options
| author | Arne Dußin | 2020-11-25 22:16:46 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-25 22:16:46 +0100 |
| commit | da19f0174b99db02e50d2f1db8aae6245d7981ca (patch) | |
| tree | 472062583ecc447a18b4f5003b6840cfa063eb1e /src/tool | |
| parent | 77f2d35cb52d9443e9a0e9250aa941fc3d7610b6 (diff) | |
| download | graf_karto-da19f0174b99db02e50d2f1db8aae6245d7981ca.tar.gz graf_karto-da19f0174b99db02e50d2f1db8aae6245d7981ca.zip | |
Fix clippy lints and add polygon tool button icon
Diffstat (limited to 'src/tool')
| -rw-r--r-- | src/tool/polygon_room_tool.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tool/polygon_room_tool.rs b/src/tool/polygon_room_tool.rs index 58f326f..42874e8 100644 --- a/src/tool/polygon_room_tool.rs +++ b/src/tool/polygon_room_tool.rs @@ -33,9 +33,8 @@ impl UnfinishedPolygon { // TODO: Is this possible without changing the mutability of self and without reallocation? let mut corners = self.corners.clone(); corners.push(self.working_corner); - let res = Polygon::check_validity(&corners); - res + Polygon::check_validity(&corners) } pub fn try_into_completed(&mut self) -> Option<Polygon<f32>> { @@ -65,7 +64,7 @@ impl UnfinishedPolygon { } pub fn try_push_working(&mut self) -> Result<(), PolygonError<f32>> { - assert!(self.corners.len() >= 1); + assert!(!self.corners.is_empty()); if self.corners.len() == 1 { return if self.corners[0] != self.working_corner { |
