lib/PublicInbox/SearchThread.pm | 11 ++--------- diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index f07dd69665623985461df30166cd0c148b4fe7f8..cc8c90ce23d4f51354e5599ecf16810d86afdd6d 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -38,13 +38,13 @@ # this delete saves around 4K across 1K messages # TODO: move this to a more appropriate place, breaks tests # if we do it during psgi_cull delete $_->{num}; - - PublicInbox::SearchThread::Msg::cast($_); + bless $_, 'PublicInbox::SearchThread::Msg'; if (exists $id_table{$_->{mid}}) { $_->{children} = []; push @imposters, $_; # we'll deal with them later undef; } else { + $_->{children} = {}; # will become arrayref later $id_table{$_->{mid}} = $_; defined($_->{references}); } @@ -106,13 +106,6 @@ bless { mid => $_[0], children => {}, # becomes an array when sorted by ->order(...) }, __PACKAGE__; -} - -# give a existing smsg the methods of this class -sub cast { - my ($smsg) = @_; - $smsg->{children} = {}; - bless $smsg, __PACKAGE__; } sub topmost {