rust/mapgen/src/lib.rs
changeset 14158 3119d665d3c6
parent 14149 b04dac00e8e2
child 14172 3c8a33ba06ba
--- a/rust/mapgen/src/lib.rs	Mon Nov 05 22:43:58 2018 +0300
+++ b/rust/mapgen/src/lib.rs	Mon Nov 05 23:15:34 2018 +0300
@@ -51,7 +51,9 @@
         OutlineTemplate {
             islands: desc.outline_points.iter()
                 .map(|v| v.iter()
-                    .map(|r| Rect::new(r.x as i32, r.y as i32, r.w, r.h))
+                    .map(|r| Rect::from_size(
+                        Point::new(r.x as i32, r.y as i32),
+                        Size::new(r.w as usize, r.h as usize)))
                     .collect())
                 .collect(),
             fill_points: desc.fill_points.iter()