diff options
author | Eric Wong <e@80x24.org> | 2016-10-05 23:47:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-10-05 23:53:23 +0000 |
commit | fcdf58e256f1668ba0d6e78806909c5981615a03 (patch) | |
tree | 22e24b5893be5cec0ef7db294eb4149f4a847e96 /lib/PublicInbox/SearchThread.pm | |
parent | 770c3c93b8a6a0db9e2152a67bccb257fa7c0233 (diff) | |
download | public-inbox-fcdf58e256f1668ba0d6e78806909c5981615a03.tar.gz |
Single use subroutines actually make the code more complex in this case, and there's never a {seen} field in $self.
Diffstat (limited to 'lib/PublicInbox/SearchThread.pm')
-rw-r--r-- | lib/PublicInbox/SearchThread.pm | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index 7e89946d..a1616620 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -31,16 +31,10 @@ sub new { sub thread { my $self = shift; - $self->_setup(); + _add_message($self, $_) foreach @{$self->{messages}}; $self->{rootset} = [ grep { !$_->{parent} } values %{$self->{id_table}} ]; - $self->_finish(); -} - -sub _finish { - my $self = shift; delete $self->{id_table}; - delete $self->{seen}; } sub _get_cont_for_id ($$) { @@ -48,12 +42,6 @@ sub _get_cont_for_id ($$) { $self->{id_table}{$mid} ||= PublicInbox::SearchThread::Msg->new($mid); } -sub _setup { - my ($self) = @_; - - _add_message($self, $_) foreach @{$self->{messages}}; -} - sub _add_message ($$) { my ($self, $smsg) = @_; |