Skip to content
Snippets Groups Projects
Select Git revision
  • a5658be1cca7fc8cbd1382fa3ddef4060e584c77
  • main default protected
  • json
3 results

participant.rs

Blame
  • participant.rs 356 B
    #[derive(Debug)]
    pub struct Participant {
        pub firstname: String,
        pub lastname: String,
        pub age: u8
    }
    
    impl Participant {
        pub fn new(firstname: &str, lastname: &str, age: u8) -> Participant {
            Participant {
                firstname: String::from(firstname),
                lastname: String::from(lastname),
                age
            }
        }
    }