(path: impl AsRef<Path>)
| 12 | |
| 13 | impl Project { |
| 14 | pub fn from_file(path: impl AsRef<Path>) -> Project { |
| 15 | let json = std::fs::read_to_string(path).unwrap(); |
| 16 | serde_json::from_str(&json).unwrap() |
| 17 | } |
| 18 | |
| 19 | pub fn get_level(&self, id: &str) -> Option<&Level> { |
| 20 | self.levels.iter().find(|l| l.identifier == id) |
nothing calls this directly
no test coverage detected