fn print_solution(solution_path : &[Node]){

	//Check if flag -printarray was specified after testfile
	let mut args_iterator = env::args();
	if args_iterator.nth(1).is_some() {
		//Flag has been specified. Reset iterator so it can be grabbed.
		args_iterator = env::args();
		let run_flag = args_iterator.nth(1).unwrap();
		if run_flag == "-printarray" {
			print_array(solution_path);
		}
		else{
			print_list(solution_path);
		}
	}
	else {
		print_list(solution_path);
	}
}
//Print the solution path as per the flag specified when called
//Defaults to list format (one node ID on each line)
Print the solution path as per the flag specified when called
Defaults to list format (one node ID on each line)
Print the solution path as per the flag specified when called Defaults to list format ( one node ID on each line )
fn print_solution(solution_path : &[Node]){
	//Check if flag -printarray was specified after testfile
	let mut args_iterator = env::args();
	if args_iterator.nth(1).is_some() {
		//Flag has been specified. Reset iterator so it can be grabbed.
		args_iterator = env::args();
		let run_flag = args_iterator.nth(1).unwrap();
		if run_flag == "-printarray" {
			print_array(solution_path);
		}
		else{
			print_list(solution_path);
		}
	}
	else {
		print_list(solution_path);
	}
}
fn print_solution ( solution_path : & [ Node ] ) { //Check if flag -printarray was specified after testfile let mut args_iterator = env :: args ( ) ; if args_iterator . nth ( 1 ) . is_some ( ) { //Flag has been specified. Reset iterator so it can be grabbed. args_iterator = env :: args ( ) ; let run_flag = args_iterator . nth ( 1 ) . unwrap ( ) ; if run_flag == " " { print_array ( solution_path ) ; } else { print_list ( solution_path ) ; } } else { print_list ( solution_path ) ; } }
Print the solution path as per the flag specified when called
Defaults to list format (one node ID on each line)
Print the solution path as per the flag specified when called Defaults to list format ( one node ID on each line )
solution_path
&[Node]
solution_path
&[Node]