I don't know what style guide the book follows, but it also works when capitalized. &mut self is short for self: &mut Self. Self is capitalized as a type, and lower case as a receiver identifier. Since two receiver types are being compared, it also makes sense for Self to be capitalized as in its de-sugared form.
I don't know what style guide the book follows, but it also works when capitalized.
&mut self
is short forself: &mut Self
.Self
is capitalized as a type, and lower case as a receiver identifier. Since two receiver types are being compared, it also makes sense forSelf
to be capitalized as in its de-sugared form.