Skip to content

Instantly share code, notes, and snippets.

@lalabuy948
Created September 29, 2018 19:33
Show Gist options
  • Save lalabuy948/053dc836e92c7b2f87835aa94773e960 to your computer and use it in GitHub Desktop.
Save lalabuy948/053dc836e92c7b2f87835aa94773e960 to your computer and use it in GitHub Desktop.
struct Person {
    firstname: String,
    lastname: String,
    age: u8,
}

impl Person {
    fn full_name(&self) -> String {
        format!("{} {}", self.firstname, self.lastname)
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment