X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fthread-cycle.t;h=1e5dfb51ab47a2865f9ab7835eda154291a5e65e;hb=d1fd2feb587b34d66227a6cb4f9c8b930812ddbf;hp=e89b18464a5f55335c63320b33e9c172e65f3f79;hpb=b28e74c9dc0acad164187f6f584f815df1bc6ec7;p=public-inbox.git diff --git a/t/thread-cycle.t b/t/thread-cycle.t index e89b1846..1e5dfb51 100644 --- a/t/thread-cycle.t +++ b/t/thread-cycle.t @@ -108,7 +108,7 @@ SKIP: { eval 'package EmptyInbox; sub smsg_by_mid { undef }'; my $ctx = { ibx => bless {}, 'EmptyInbox' }; my $rootset = PublicInbox::SearchThread::thread($smsgs, sub { - [ sort { $a->{mid} cmp $b->{mid} } @{$_[0]} ] }, $ctx); + @{$_[0]} = sort { $a->{mid} cmp $b->{mid} } @{$_[0]} }, $ctx); my $oldout = select $fh; find_cycle($rootset); select $oldout; @@ -120,7 +120,7 @@ done_testing; sub thread_to_s { my ($msgs) = @_; my $rootset = PublicInbox::SearchThread::thread($msgs, sub { - [ sort { $a->{mid} cmp $b->{mid} } @{$_[0]} ] }); + @{$_[0]} = sort { $a->{mid} cmp $b->{mid} } @{$_[0]} }); my $st = ''; my @q = map { (0, $_) } @$rootset; while (@q) {