You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
583 B

struct User {
active: bool,
username: String,
email: String,
sign_in_count: u64,
}
// ANCHOR: here
fn main() {
// --snip--
// ANCHOR_END: here
let user1 = User {
email: String::from("someone@example.com"),
username: String::from("someusername123"),
active: true,
sign_in_count: 1,
};
// ANCHOR: here
let user2 = User {
active: user1.active,
username: user1.username,
email: String::from("another@example.com"),
sign_in_count: user1.sign_in_count,
};
}
// ANCHOR_END: here