Skip to content

Commit

Permalink
Fix another listing number
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Oct 3, 2024
1 parent e69397e commit 8f1ef1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch20-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ dereference operator `*` on a raw pointer that requires an `unsafe` block.
Creating a pointer does no harm; it’s only when we try to access the value that
it points at that we might end up dealing with an invalid value.

Note also that in Listing 20-1 and 19-3, we created `*const i32` and `*mut i32`
Note also that in Listing 20-1 and 20-3, we created `*const i32` and `*mut i32`
raw pointers that both pointed to the same memory location, where `num` is
stored. If we instead tried to create an immutable and a mutable reference to
`num`, the code would not have compiled because Rust’s ownership rules don’t
Expand Down

0 comments on commit 8f1ef1e

Please sign in to comment.