lib/PublicInbox/SearchThread.pm | 7 +------ diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index ba31f4322ae851c23a65fdfe6e96c0a42f28b601..2e7b79a0faaaa0d685b98272983114013a47532b 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -203,7 +203,6 @@ sub order_children { my ($walk, $ordersub) = @_; my %seen; - my $depth = 0; my @visited; while ($walk) { push @visited, $walk; @@ -222,17 +221,13 @@ $walk->{next} = $next = undef; } # go down, or across - if ($child) { - $next = $child; - ++$depth; - } + $next = $child if $child; # no next? look up if (!$next) { my $up = $walk; while ($up && !$next) { $up = $up->{parent}; - --$depth; $next = $up->{next} if $up; } }