Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Person {
- first_name: String,
- last_name: String,
- }
- fn create_person() -> Person {
- Person {
- first_name: "Alice".to_owned(),
- last_name: "Dow".to_owned(),
- }
- }
- fn main() {
- let x = &create_person();
- println!("{}", x.last_name);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement