From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9CE8C1F4DB for ; Wed, 11 Dec 2024 08:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1733904648; bh=9Q+aq4Q3uT0kp6WirnxgfhX0/sgl2m6koVIb/BD/SaA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pbu2GxmsJB00KF67CAUsQMwnJwsTU1/ctLEGLxuGcqIaescdaE7tAgfKdmqlb2zkd 8NGmstzzd5MzKzO6vFO4EDxWqNYLiigQmGmwFqRWUcDgMqCldFr4++5jsxz9FGb2xf QLvJha4dXeKd/BmOYJDkJHJe/1zB17uMZ8RvHjqw= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/4] over_idx: simplify each_by_mid Date: Wed, 11 Dec 2024 08:10:47 +0000 Message-ID: <20241211081047.1267062-5-e@80x24.org> In-Reply-To: <20241211081047.1267062-1-e@80x24.org> References: <20241211081047.1267062-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index dea6f0fc..b7bebf58 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -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) {