diff --git a/src/cmd.rs b/src/cmd.rs index 2330c91..5943480 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -10,15 +10,15 @@ airport-paths -h ); } -pub fn handle_args(args: Vec, _code_to_id: HashMap) -> (usize, usize) { +pub fn handle_args(args: Vec, code_to_id: HashMap) -> (usize, usize) { let (origin, destination) = match args.len() { 3 => { let exit_handler = || { println!("unable to find airport"); exit(2); }; - let origin = _code_to_id.get(&args[1]).unwrap_or_else(exit_handler); - let destination = _code_to_id.get(&args[2]).unwrap_or_else(exit_handler); + let origin = code_to_id.get(&args[1]).unwrap_or_else(exit_handler); + let destination = code_to_id.get(&args[2]).unwrap_or_else(exit_handler); (origin, destination) }