Fix a typo in 03_ticket_v1/08_stack (#19)

The type argument of `size_of` is `<u8>` instead of `<String>`.
This commit is contained in:
Fangyi Zhou 2024-05-18 16:57:02 +01:00 committed by GitHub
parent 44f3260fbe
commit d5f407d720
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ using the [`std::mem::size_of`](https://doc.rust-lang.org/std/mem/fn.size_of.htm
For a `u8`, for example:
```rust
// We'll explain this funny-looking syntax (`::<String>`) later on.
// We'll explain this funny-looking syntax (`::<u8>`) later on.
// Ignore it for now.
assert_eq!(std::mem::size_of::<u8>(), 1);
```
@ -59,4 +59,4 @@ assert_eq!(std::mem::size_of::<u8>(), 1);
[^stack-overflow]: If you have nested function calls, each function pushes its data onto the stack when it's called but
it doesn't pop it off until the innermost function returns.
If you have too many nested function calls, you can run out of stack space—the stack is not infinite!
That's called a [**stack overflow**](https://en.wikipedia.org/wiki/Stack_overflow).
That's called a [**stack overflow**](https://en.wikipedia.org/wiki/Stack_overflow).