(file_path: &Path)
| 53 | } |
| 54 | |
| 55 | fn read_single_route(file_path: &Path) -> Option<ast::Route> { |
| 56 | match fs::read_to_string(file_path) { |
| 57 | Ok(input) => match parser::parse_route(&input) { |
| 58 | Ok(route) => return Some(route), |
| 59 | Err(e) => eprintln!("Error parsing route file {:?}: {}", file_path, e), |
| 60 | }, |
| 61 | Err(e) => eprintln!("Error reading route file {:?}: {}", file_path, e), |
| 62 | } |
| 63 | |
| 64 | None |
| 65 | } |
| 66 | |
| 67 | pub async fn run(path: Option<PathBuf>, port: u16, reload: bool) { |
| 68 | if !reload { |
no test coverage detected