Skip to content

Commit 22eb466

Browse files
committed
Fix typo
Thanks apdapreturns
1 parent 222cd73 commit 22eb466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/the-stack-and-the-heap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Rust programs use [jemalloc][jemalloc] for this purpose.
266266
Anyway, back to our example. Since this memory is on the heap, it can stay
267267
alive longer than the function which allocates the box. In this case, however,
268268
it doesn’t.[^moving] When the function is over, we need to free the stack frame
269-
for `main()`. `Box<T>`, though, has a trick up its sleve: [Drop][drop]. The
269+
for `main()`. `Box<T>`, though, has a trick up its sleeve: [Drop][drop]. The
270270
implementation of `Drop` for `Box` deallocates the memory that was allocated
271271
when it was created. Great! So when `x` goes away, it first frees the memory
272272
allocated on the heap:

0 commit comments

Comments
 (0)