1
0
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:
Fabian Bornhofen 2023-01-11 13:29:43 +01:00
parent d1422e93c2
commit 5256d9c3fd

View File

@ -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>