pub trait Day: std::fmt::Debug { fn part1(&mut self) -> String; fn part2(&mut self) -> String; fn parse(&mut self) {} fn solve(&mut self, part: u8) -> String { self.parse(); match part { 1 => self.part1(), 2 => self.part2(), _ => panic!("Invalid part #"), } } }