Check if name is a substring of system name instead of exact match
This commit is contained in:
parent
5f341ae5f1
commit
273e5c74c3
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue