We can build `$u' in one line, and drop an unnecessary empty
line to reduce the amount of scrolling required to read this
sub.
---
 lib/PublicInbox/View.pm | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 52d37a9f..b27523b2 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -811,7 +811,6 @@ ${fallback}other threads:[<a
 href="$upfx?t=$t">~$t_fmt UTC</a>|<a
 href="$upfx">newest</a>]
 EOF
-
                thread_skel(\$skel, $ctx, $hdr);
                my ($next, $prev);
                my $parent = '       ';
@@ -821,12 +820,8 @@ EOF
                        $n = mid_href($n);
                        $next = "<a\nhref=\"$upfx$n/\"\nrel=next>next</a>";
                }
-               my $u;
                my $par = $ctx->{parent_msg};
-               if ($par) {
-                       $u = mid_href($par);
-                       $u = "$upfx$u/";
-               }
+               my $u = $par ? $upfx.mid_href($par).'/' : undef;
                if (my $p = $ctx->{prev_msg}) {
                        $prev = mid_href($p);
                        if ($p && $par && $p eq $par) {

Reply via email to