Title: Hands-on Rusk: Chapter 9 (code to handle attacked)
It’s not clear that this code needs to be placed inside the movers.iter()…for_each() {}. Placing it after the for_each results in variables out of scope (and invalid logic come to think of it. (Guess it’s obvious where I placed it (not thinking)
Edit… managed to get this “double wrong”. It was a good debugging exercise for me, but I think it points to there needing to be more attention on how to point the read to where code needs to be inserted. It’s a bit of an on-going theme, that I put code in the wrong place. (Could be a “just me” thing, so take that into account.)
(Just another post in my quest for “top whiner” badge )