Skip to content

Instantly share code, notes, and snippets.

@Gisleburt
Last active June 10, 2019 12:28
Show Gist options
  • Save Gisleburt/d06f82cbd4b450b186050b8d8bcb47ea to your computer and use it in GitHub Desktop.
Save Gisleburt/d06f82cbd4b450b186050b8d8bcb47ea to your computer and use it in GitHub Desktop.
fn main() {
let daniel = User {
name: "Daniel".into(),
albums: vec![
Album {
title: "Sgt. Pepper's Lonely Hearts Club Band".into(),
artist: "The Beatles".into(),
},
Album {
title: "Dark Side of the Moon".into(),
artist: "Pink Floyd".into(),
},
],
};
println!("{}'s albums:", daniel.name);
println!("{}", daniel.borrow_albums());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment