pub fn parse_input_file(
filename: &String,
) -> Result<Vec<CustomTask<i64>>, String>
Examples found in repository?
examples/read_from_file.rs (line 15)
8fn main() {
9 let mut scheduler = scheduler::Scheduler::new();
10 let args: Vec<String> = env::args().collect();
11 if args.len() < 2 {
12 eprintln!("Please provide an input file path!");
13 exit(1);
14 }
15 match input_parser::parse_input_file(&args[1]) {
16 Ok(task_list) => {
17 match scheduler.fill_tasklist(task_list) {
18 Ok(()) => {},
19 Err(e) => {eprintln!("Error: {}", e); exit(1);},
20 }
21 match scheduler.schedule() {
22 Ok(()) => {},
23 Err(e) => {eprintln!("Error: {}", e); exit(1);},
24 }
25 },
26 Err(e) => {eprintln!("Error: {}", e); exit(1);},
27 }
28
29}