@@ -148,13 +148,13 @@ the struct’s definition.
148
148
Note that the struct update syntax uses ` = ` like an assignment; this is because
149
149
it moves the data, just as we saw in the [ “Variables and Data Interacting with
150
150
Move”] [ move ] <!-- ignore --> section. In this example, we can no longer use
151
- ` user1 ` after creating ` user2 ` because the ` String ` in the ` username ` field of
152
- ` user1 ` was moved into ` user2 ` . If we had given ` user2 ` new ` String ` values for
153
- both ` email ` and ` username ` , and thus only used the ` active ` and
154
- ` sign_in_count ` values from ` user1 ` , then ` user1 ` would still be valid after
155
- creating ` user2 ` . Both ` active ` and ` sign_in_count ` are types that implement
156
- the ` Copy ` trait, so the behavior we discussed in the [ “Stack-Only Data:
157
- Copy”] [ copy ] <!-- ignore --> section would apply.
151
+ ` user1 ` as a whole after creating ` user2 ` because the ` String ` in the
152
+ ` username ` field of ` user1 ` was moved into ` user2 ` . If we had given ` user2 ` new
153
+ ` String ` values for both ` email ` and ` username ` , and thus only used the
154
+ ` active ` and ` sign_in_count ` values from ` user1 ` , then ` user1 ` would still be
155
+ valid after creating ` user2 ` . Both ` active ` and ` sign_in_count ` are types that
156
+ implement the ` Copy ` trait, so the behavior we discussed in the [ “Stack-Only
157
+ Data: Copy”] [ copy ] <!-- ignore --> section would apply.
158
158
159
159
### Using Tuple Structs Without Named Fields to Create Different Types
160
160
0 commit comments