From: Eric Wong Date: Sun, 5 Jul 2020 23:27:47 +0000 (+0000) Subject: feed: generate_i: eliminate pointless loop X-Git-Tag: v1.6.0~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=204c19cddc0e184860d36999e341f96e26272d1d;p=thirdparty%2Fpublic-inbox.git feed: generate_i: eliminate pointless loop $ctx->{msgs} won't ever contain undef values. --- diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index b15fc3a09..9141faaf0 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