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