From 56dce6e3ffa781949871164d31a4665ca853e010 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Thu, 3 Oct 2024 08:24:47 -0600 Subject: [PATCH] Fix another listing number --- src/ch20-01-unsafe-rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch20-01-unsafe-rust.md b/src/ch20-01-unsafe-rust.md index f444ce9f20..4aadf82d83 100644 --- a/src/ch20-01-unsafe-rust.md +++ b/src/ch20-01-unsafe-rust.md @@ -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