mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-10 00:44:21 +02:00
Add speaker notes for box.md
This commit is contained in:
parent
d1422e93c2
commit
5256d9c3fd
@ -28,3 +28,10 @@ from `T` directly on a `Box<T>`][2].
|
||||
|
||||
[1]: https://doc.rust-lang.org/std/boxed/struct.Box.html
|
||||
[2]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion
|
||||
|
||||
<details>
|
||||
|
||||
* `Box` is like `std::unique_ptr` in C++.
|
||||
* In the above example, you can even leave out the `*` in the `println!` statement thanks to `Deref`.
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user