Browse Source

Merge pull request #5 from gbmor-forks/minor-fix-of-ref

changed move to ref to match function signature
Herbert "TheBracket 5 years ago
parent
commit
fb071fcd99
1 changed files with 3 additions and 3 deletions
  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.
 
----
+---