about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/thread-cycle.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/thread-cycle.t b/t/thread-cycle.t
index 9dd2aa3c..16ceee71 100644
--- a/t/thread-cycle.t
+++ b/t/thread-cycle.t
@@ -72,11 +72,11 @@ SKIP: {
 done_testing();
 
 sub thread_to_s {
-        my $th = PublicInbox::SearchThread->new(shift);
-        $th->thread;
-        $th->order(sub { [ sort { $a->{id} cmp $b->{id} } @{$_[0]} ] });
+        my ($msgs) = @_;
+        my $rootset = PublicInbox::SearchThread::thread($msgs, sub {
+                [ sort { $a->{id} cmp $b->{id} } @{$_[0]} ] });
         my $st = '';
-        my @q = map { (0, $_) } @{$th->{rootset}};
+        my @q = map { (0, $_) } @$rootset;
         while (@q) {
                 my $level = shift @q;
                 my $node = shift @q or next;