浏览代码

changed move to ref to match function signature

Ben Morrison 5 年之前
父节点
当前提交
2dab3a9902
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      book/src/chapter_4.md

+ 3 - 3
book/src/chapter_4.md

@@ -106,8 +106,8 @@ pub fn new_map_rooms_and_corridors() -> Vec<TileType> {
     let room1 = Rect::new(20, 15, 10, 15);
     let room2 = Rect::new(35, 15, 10, 15);
 
-    apply_room_to_map(room1, &mut map);
-    apply_room_to_map(room2, &mut map);
+    apply_room_to_map(&room1, &mut map);
+    apply_room_to_map(&room2, &mut map);
 
     map
 }
@@ -300,4 +300,4 @@ You should now get something like this when you `cargo run` your project:
 
 Copyright (C) 2019, Herbert Wolverson.
 
----
+---