]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/book/listings/ch05-using-structs-to-structure-related-data/listing-05-07/src/main.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / doc / book / listings / ch05-using-structs-to-structure-related-data / listing-05-07 / src / main.rs
index 17cef457bdf477c01346a1fff11e120d500e02d6..8754639106e9adb601e26597f4b1d1f0e03793f9 100644 (file)
@@ -1,8 +1,8 @@
 struct User {
+    active: bool,
     username: String,
     email: String,
     sign_in_count: u64,
-    active: bool,
 }
 
 fn main() {
@@ -16,7 +16,6 @@ fn main() {
     // ANCHOR: here
     let user2 = User {
         email: String::from("another@example.com"),
-        username: String::from("anotherusername567"),
         ..user1
     };
     // ANCHOR_END: here