Skip to content

Commit

Permalink
Correct the description of Listing 5-6
Browse files Browse the repository at this point in the history
It used to have the inverse of what it was actually doing!

Fixes #3488
  • Loading branch information
chriskrycho committed Apr 5, 2024
1 parent 204c6c4 commit 3e96c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch05-01-defining-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ otherwise use the same values from `user1` that we created in Listing 5-2.
{{#rustdoc_include ../listings/ch05-using-structs-to-structure-related-data/listing-05-06/src/main.rs:here}}
```

<span class="caption">Listing 5-6: Creating a new `User` instance using one of
<span class="caption">Listing 5-6: Creating a new `User` instance using all but one of
the values from `user1`</span>

Using struct update syntax, we can achieve the same effect with less code, as
Expand Down

0 comments on commit 3e96c36

Please sign in to comment.