Check if name is a substring of system name instead of exact match

This commit is contained in:
Daniel S. 2019-06-29 18:11:32 +02:00
parent 5f341ae5f1
commit 273e5c74c3
1 changed files with 2 additions and 2 deletions

View File

@ -407,11 +407,11 @@ impl Router {
fn name_to_systems(&self, name: &str) -> Vec<&System> {
for sys in &self.tree {
if sys.name == name {
if sys.name.contains(name) {
return self.neighbours(&sys, 0.0).collect();
}
}
eprintln!("Sytem not found: \"{}\"", name);
eprintln!("System not found: \"{}\"", name);
std::process::exit(1);
}