()
| 42 | } |
| 43 | |
| 44 | fn main() { |
| 45 | let args: Vec<String> = env::args().collect(); |
| 46 | if args.len() == 2 { |
| 47 | // one argument passed |
| 48 | match args[1].as_str() { |
| 49 | "list" => { |
| 50 | for p in get_task_list() |
| 51 | { |
| 52 | let json = serde_json::to_string(&p).unwrap(); |
| 53 | println!("{json}"); |
| 54 | } |
| 55 | exit(0); |
| 56 | }, |
| 57 | "get" | "set" | "test" => { // used for testing only |
| 58 | print_input(); |
| 59 | exit(0); |
| 60 | }, |
| 61 | _ => { |
| 62 | help(); |
| 63 | exit(1); |
| 64 | }, |
| 65 | } |
| 66 | } |
| 67 | else { |
| 68 | help(); |
| 69 | exit(1); |
| 70 | } |
| 71 | } |
nothing calls this directly
no test coverage detected