about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-05 23:27:47 +0000
committerEric Wong <e@yhbt.net>2020-07-06 20:01:15 +0000
commit204c19cddc0e184860d36999e341f96e26272d1d (patch)
tree7494a0e8daf85b0cb87c54c4506a2532ca1c15d2 /lib/PublicInbox/Feed.pm
parent677772ba8f661e78494ee1d185ab05ad5bdaac87 (diff)
downloadpublic-inbox-204c19cddc0e184860d36999e341f96e26272d1d.tar.gz
$ctx->{msgs} won't ever contain undef values.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm4
1 files changed, 1 insertions, 3 deletions
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