rust-lang / async-book

Asynchronous Programming in Rust
https://rust-lang.github.io/async-book/index.html
MIT License
1.84k stars 248 forks source link

Fix Typo in The Future Trait Chapter #207

Closed Kartik1397 closed 9 months ago

sunrosa commented 9 months ago

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.

Kartik1397 commented 9 months ago

Since two receiver types are being compared, it also makes sense for Self to be capitalized as in its de-sugared form.

Right, in the context of types &mut Self seems correct.

Thanks for the review @sunrosa!