diff options
author | Eric Wong <e@80x24.org> | 2022-08-04 08:17:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-04 20:09:36 +0000 |
commit | c5c508f3094ffe7ef4a52f8c471340fe8992f6bb (patch) | |
tree | f2d5a03bc120a9aacad1b29e7f1f2a6b6948bc97 | |
parent | b896b1043b81274b8b1737320c49f3fb7ce9f842 (diff) | |
download | public-inbox-c5c508f3094ffe7ef4a52f8c471340fe8992f6bb.tar.gz |
We can rely on auto-vivification to avoid an intermediate array for the map result.
-rw-r--r-- | lib/PublicInbox/View.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fa96cca3..26094082 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2021 all contributors <meta@public-inbox.org> +# Copyright (C) all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # # Used for displaying the HTML web interface. @@ -429,7 +429,7 @@ sub stream_thread_i { # PublicInbox::WwwStream::getline callback sub stream_thread ($$) { my ($rootset, $ctx) = @_; - $ctx->{-queue} = [ map { (0, $_) } @$rootset ]; + @{$ctx->{-queue}} = map { (0, $_) } @$rootset; PublicInbox::WwwStream::aresponse($ctx, 200, \&stream_thread_i); } |