summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-09-05 21:00:20 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-09-05 21:00:20 +0200
commit0a7188d2e2b1c7caa173fbd58174af1a48dedccd (patch)
treedced06e31c943604e2b9ea25dc98c2153c11acb6 /lib/Travelynx/Controller
parent3b9db4bfd4cbfef06dfbb346755e56c211985281 (diff)
get_connecting_trains_p: use has_str_in_list helper more often
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm4
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 ] );