diff options
author | Eric Wong <e@80x24.org> | 2022-08-20 08:01:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-20 18:30:55 +0000 |
commit | 2093629bc108e7ce17d932738f692eaa9721c1dd (patch) | |
tree | 9abd18ce29eb2ba2172c03255a8c8a471fe34070 /lib/PublicInbox/IMAP.pm | |
parent | 3abb66d699f73d34e43ce4ca6bbce7d4fa9b3bcc (diff) | |
download | public-inbox-2093629bc108e7ce17d932738f692eaa9721c1dd.tar.gz |
We can assign arrays directly without `[]' creating an extra immortal pad allocation.
Diffstat (limited to 'lib/PublicInbox/IMAP.pm')
-rw-r--r-- | lib/PublicInbox/IMAP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index 0a65d87c..1f65aa65 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -1005,7 +1005,7 @@ sub fetch_compile ($) { # stabilize partial order for consistency and ease-of-debugging: if (scalar keys %partial) { $need |= NEED_BLOB; - $r[2] = [ map { [ $_, @{$partial{$_}} ] } sort keys %partial ]; + @{$r[2]} = map { [ $_, @{$partial{$_}} ] } sort keys %partial; } push @op, $OP_EML_NEW if ($need & (EML_HDR|EML_BDY)); @@ -1028,7 +1028,7 @@ sub fetch_compile ($) { # r[1] = [ $key1, $cb1, $key2, $cb2, ... ] use sort 'stable'; # makes output more consistent - $r[1] = [ map { ($_->[2], $_->[1]) } sort { $a->[0] <=> $b->[0] } @op ]; + @{$r[1]} = map { ($_->[2], $_->[1]) } sort { $a->[0] <=> $b->[0] } @op; @r; } |