diff --git a/src/main.rs b/src/main.rs index 87178c3..f9e1f74 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,20 +9,19 @@ use std::{ cell::RefCell, collections::{hash_map::Entry, HashMap}, env, - f64::INFINITY, rc::Rc, }; use parse::Record; -type Graph = HashMap>>; +type NodePointer = Rc>; +type Graph = HashMap; type Airports = HashMap>; #[derive(Debug, Clone)] struct Node { origin: Rc, destinations: Vec, - source_distance: f64, visited: bool, } @@ -31,7 +30,6 @@ impl Node { Node { destinations, origin, - source_distance: INFINITY, visited: false, } } @@ -39,7 +37,7 @@ impl Node { #[derive(Clone)] struct Destination { - node: Rc>, + node: NodePointer, distance: f64, }