]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: _th_index_lite: use `//' defined-or op
authorEric Wong <e@80x24.org>
Sat, 10 Sep 2022 08:17:10 +0000 (08:17 +0000)
committerEric Wong <e@80x24.org>
Sat, 10 Sep 2022 19:50:39 +0000 (19:50 +0000)
Just something I noticed while evaluating this subroutine
for the buffering overhaul.

lib/PublicInbox/View.pm

index 3282d4f993edc6281c75ac00127e40f8f5a359d4..08ba54bb3578b7e3d7370641cb19aba654e29367 100644 (file)
@@ -302,8 +302,7 @@ sub _th_index_lite {
        my $rv = '';
        my $mapping = $ctx->{mapping} or return $rv;
        my $pad = '  ';
-       my $mid_map = $mapping->{$mid_raw};
-       defined $mid_map or
+       my $mid_map = $mapping->{$mid_raw} //
                return 'public-inbox BUG: '.ascii_html($mid_raw).' not mapped';
        my ($attr, $node, $idx, $level) = @$mid_map;
        my $children = $node->{children};