Hands-on Rust: why a second clone?

Title: Hands-On Rust (Chapter 10: Iterating Away the Chaos)

in the iteration function, why is it necessary to return a clone of new_tiles (which was already cloned from map.tiles?)

1 Like