Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Book{
- title: String
- }
- fn main() {
- let book: Book = Book {title: String::from("The Title")};
- let book2 = book;
- println!("Book title:{}", book.title);
- println!("Book2 title:{}", book2.title);
- }
Add Comment
Please, Sign In to add comment