Skip to content

Commit

Permalink
Merge pull request #4046 from jpmelos/small-improvements-to-ch05
Browse files Browse the repository at this point in the history
Mention move of individual struct fields in struct update syntax
  • Loading branch information
chriskrycho authored Oct 2, 2024
2 parents 801988c + 26bea11 commit 08dc0d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ch05-01-defining-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ Move”][move]<!-- ignore --> section. In this example, we can no longer use
`active` and `sign_in_count` values from `user1`, then `user1` would still be
valid after creating `user2`. Both `active` and `sign_in_count` are types that
implement the `Copy` trait, so the behavior we discussed in the [“Stack-Only
Data: Copy”][copy]<!-- ignore --> section would apply.
Data: Copy”][copy]<!-- ignore --> section would apply. We can still use
`user1.email` in this example, since its value was _not_ moved out.

### Using Tuple Structs Without Named Fields to Create Different Types

Expand Down

0 comments on commit 08dc0d2

Please sign in to comment.