fix some compile errors
authoralfadur
Fri, 02 Nov 2018 22:50:45 +0300
changeset 14097 400864ecb954
parent 14096 133f648c5fbd
child 14098 a8e194ae26e8
fix some compile errors
rust/landgen/src/outline.rs
--- a/rust/landgen/src/outline.rs	Fri Nov 02 22:41:11 2018 +0300
+++ b/rust/landgen/src/outline.rs	Fri Nov 02 22:50:45 2018 +0300
@@ -193,14 +193,15 @@
     }
 
     pub fn mirror(&mut self) {
+        let width = self.size.width as i32;
         self.iter_mut()
-            .for_each(|p| p.x = self.size.width() - 1 - p.x);
+            .for_each(|p| p.x = width - 1 - p.x);
     }
 
     pub fn flip(&mut self) {
-        points
-            .iter_mut()
-            .for_each(|p| p.y = self.size.height() - 1 - p.y);
+        let height = self.size.height as i32;
+        self.iter_mut()
+            .for_each(|p| p.y = height - 1 - p.y);
     }
 }