From 204c19cddc0e184860d36999e341f96e26272d1d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Jul 2020 23:27:47 +0000 Subject: feed: generate_i: eliminate pointless loop $ctx->{msgs} won't ever contain undef values. --- lib/PublicInbox/Feed.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index b15fc3a0..9141faaf 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -11,9 +11,7 @@ use PublicInbox::Smsg; # this loads w/o Search::Xapian sub generate_i { my ($ctx) = @_; - while (my $smsg = shift @{$ctx->{msgs}}) { - return $smsg; - } + shift @{$ctx->{msgs}}; } # main function -- cgit v1.2.3-24-ge0c7