Skip to content

Commit 002bb5b

Browse files
authored
Update unique.md
1 parent 42db8c1 commit 002bb5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unique.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn foo() {
3737
```
3838

3939
Here `x` is a pointer to a location on the heap which contains the value `75`.
40-
`x` has type `Box<isize>`; we could have written `let x: Box<isize> =
40+
`x` has type `Box<i32>`; we could have written `let x: Box<i32> =
4141
Box::new(75);`. This is similar to writing `int* x = new int(75);` in C++.
4242
Unlike in C++, Rust will tidy up the memory for us, so there is no need to call
4343
`free` or `delete`<sup>[1](#1)</sup>. Unique pointers behave similarly to

0 commit comments

Comments
 (0)