1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-07 06:55:42 +02:00

Various small fixes (#1556)

Plus one more substantial comment on casting.
This commit is contained in:
Marshall Pierce
2023-12-05 16:06:42 -07:00
committed by GitHub
parent 8f9902cc3e
commit 6c5061bb90
16 changed files with 23 additions and 21 deletions

View File

@ -75,6 +75,5 @@ Key Points:
* Note how `self` is used like other structs and dot notation can be used to refer to individual fields.
* This might be a good time to demonstrate how the `&self` differs from `self` by trying to run `finish` twice.
* Beyond variants on `self`, there are also [special wrapper types](https://doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be receiver types, such as `Box<Self>`.
* Note that references have not been covered yet. References in method receivers are a particularly "natural" form of reference, so there is no need to go into a great level of detail.
</details>