Skip to content

Commit

Permalink
fix typo in box.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xrdelectro authored and zigmars committed Sep 11, 2024
1 parent 1afd366 commit e376b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/smart-pointers/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ fn main() {
- `Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be not
null.
- A `Box` can be useful when you:
- have a type whose size that can't be known at compile time, but the Rust
compiler wants to know an exact size.
- have a type whose size can't be known at compile time, but the Rust compiler
wants to know an exact size.
- want to transfer ownership of a large amount of data. To avoid copying large
amounts of data on the stack, instead store the data on the heap in a `Box`
so only the pointer is moved.
Expand Down

0 comments on commit e376b1c

Please sign in to comment.