Note that when you change num to take &self instead, this works out (you also need to mark foo as mutable, of course).
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies:
Note that when you change num to take &self instead, this works out (you also need to mark foo as mutable, of course).