diff --git a/src/main.rs b/src/main.rs index 4f00369..775889c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -163,7 +163,7 @@ pub fn update_rendered_state( .get_mut(old_rendered_state) .expect("World is not setup correctly"); - old_rendered_state.data = new_state.cells.clone(); + old_rendered_state.data.clone_from(&new_state.cells); } } @@ -216,4 +216,3 @@ fn main() -> std::io::Result<()> { Ok(()) } -