diff options
author | Daniel Friesel <derf@finalrewind.org> | 2022-09-05 21:00:20 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2022-09-05 21:00:20 +0200 |
commit | 0a7188d2e2b1c7caa173fbd58174af1a48dedccd (patch) | |
tree | dced06e31c943604e2b9ea25dc98c2153c11acb6 /lib/Travelynx/Controller | |
parent | 3b9db4bfd4cbfef06dfbb346755e56c211985281 (diff) |
get_connecting_trains_p: use has_str_in_list helper more often
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 5bfe48a..007b725 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -136,7 +136,7 @@ sub get_connecting_trains_p { my @via = ( $train->sched_route_post, $train->sched_route_end ); for my $dest (@destinations) { - if ( List::Util::any { $_ eq $dest } @via ) { + if ( has_str_in_list( $dest, @via ) ) { push( @cancellations, [ $train, $dest ] ); next; } @@ -146,7 +146,7 @@ sub get_connecting_trains_p { my @via = ( $train->route_post, $train->route_end ); for my $dest (@destinations) { if ( $via_count{$dest} < 2 - and List::Util::any { $_ eq $dest } @via ) + and has_str_in_list( $dest, @via ) ) { push( @results, [ $train, $dest ] ); |