From 0a7188d2e2b1c7caa173fbd58174af1a48dedccd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 5 Sep 2022 21:00:20 +0200 Subject: get_connecting_trains_p: use has_str_in_list helper more often --- lib/Travelynx/Controller/Traveling.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 ] ); -- cgit v1.2.3