1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-31 11:01:46 +02:00

Small improvement to wording in box-recursive.md (#905)

The "it" was not clear to our Localization team so I tried to make the sentence a little clearer.
This commit is contained in:
Martin Geisler 2023-07-05 15:36:07 +02:00 committed by GitHub
parent 72a87de08e
commit d27daceda2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,8 +30,8 @@ fn main() {
<details>
* If the `Box` was not used here and we attempted to embed a `List` directly into the `List`,
the compiler would not compute a fixed size of the struct in memory, it would look infinite.
* If `Box` was not used and we attempted to embed a `List` directly into the `List`,
the compiler would not compute a fixed size of the struct in memory (`List` would be of infinite size).
* `Box` solves this problem as it has the same size as a regular pointer and just points at the next
element of the `List` in the heap.