diff --git a/src/main.rs b/src/main.rs index 961bd7f..87178c3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,6 +9,7 @@ use std::{ cell::RefCell, collections::{hash_map::Entry, HashMap}, env, + f64::INFINITY, rc::Rc, }; @@ -30,7 +31,7 @@ impl Node { Node { destinations, origin, - source_distance: 0.0, + source_distance: INFINITY, visited: false, } }