]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
over_idx: simplify each_by_mid
authorEric Wong <e@80x24.org>
Wed, 11 Dec 2024 08:10:47 +0000 (08:10 +0000)
committerEric Wong <e@80x24.org>
Thu, 12 Dec 2024 08:44:16 +0000 (08:44 +0000)
Eliminate a useless use of `map {}' and avoid a needless `push'
op since the `join' op can just take extra arg.

lib/PublicInbox/OverIdx.pm

index dea6f0fc2a60c63a7a3228eea0f9a3ec5a87fa24..b7bebf58518f54e02b02a9bde8e06b1e19731762 100644 (file)
@@ -139,8 +139,7 @@ SELECT id FROM msgid WHERE mid = ? LIMIT 1
        my $id = $sth->fetchrow_array;
        defined $id or return;
 
-       push(@$cols, 'num');
-       $cols = join(',', map { $_ } @$cols);
+       $cols = join ',', @$cols, 'num';
        my $lim = 10;
        my $prev = get_counter($dbh, 'ghost');
        while (1) {