ziglings icon indicating copy to clipboard operation
ziglings copied to clipboard

Excercise 047 has mis-matched comment to code (mutable self)

Open ratfactor opened this issue 3 years ago • 1 comments

Thanks to @unional for pointing out that the comment and code on Ex 047 do not match, which is super unfortunate. The comment shows an instance where we don't need a mutable reference. The code uses a self: *foo reference since it does need to be mutable.

There may be other instances where this has happened. Probably better check every instance of self in the Ziglings exercises to make sure this is being used consistently.

Re: #123

ratfactor avatar Aug 19 '22 13:08 ratfactor

I know I was confused by the selfs in the exercises and was never sure whether I should've been using * or not. Maybe that was the result of it being inconsistent?

hippietrail avatar Aug 19 '22 14:08 hippietrail