From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BA8D51FAE7 for ; Thu, 5 Apr 2018 09:34:13 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 5/7] searchview: minor cleanup Date: Thu, 5 Apr 2018 09:34:10 +0000 Message-Id: <20180405093412.22348-6-e@80x24.org> In-Reply-To: <20180405093412.22348-1-e@80x24.org> References: <20180405093412.22348-1-e@80x24.org> List-Id: $mset->size is probably more obvious than relying on a tied array and saves us a line. --- lib/PublicInbox/SearchView.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index c789795..d038dfc 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -180,9 +180,8 @@ sub search_nav_top { sub search_nav_bot { my ($mset, $q) = @_; my $total = $mset->get_matches_estimated; - my $nr = scalar $mset->items; my $o = $q->{o}; - my $end = $o + $nr; + my $end = $o + $mset->size; my $beg = $o + 1; my $rv = '
';
 	if ($beg <= $end) {
-- 
EW