Thank you for the tips!! Both of those are great. I implemented the first and I'll think on what I can improve by using byte slices in that form- enumerating over them should be cleaner for starters.
Note that I'm not sure whether [u8; 5] will actually be easier. Just something to experiment with.
Hmm, something else I noticed:
Some(x).unwrap() is just x, so you can simplify a bunch of that.
Stylistically, I'd suggest putting GuessedLetterResult::CorrectSpot instead of _ there. When there's only one left, might as well make that clear to the reader, rather them wonder if they remembered all the other cases.
You should probably be deriving Copy on more of your types. GuessedLetterResult and GuessedLetter are both small-and-simple, great candidates for Copy.
Awesome, that's great feedback! For some reason it didn't occur to me that Copy would be derivable as well (I was pretty liberal with skimming docs, heh..). But in hindsight it makes total sense that would work when all members implement copy.
For returning an iterator, stack overflow had similar suggestions, and I tried brute forcing a signature without really knowing what I was doing, but no luck.. I just need to spend the time to really understand traits and lifetimes to get it right.
It was very surprising to me that I couldn't just highlight the following lines and extract a function with rust-analyzer. When I tried that with the lines below, the generated function had a return type of "_", so I guess the compiler couldn't figure it out either, which made me feel less bad
Again thanks so much for the review. I wasn't expecting anyone to be so thorough, that's very kind of you and I really appreciate it.