about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-08 11:13:27 +0000
committerEric Wong <e@80x24.org>2019-01-08 19:27:41 +0000
commitbbb8c7788ebaa7f3679d387725ee1998f0b2f615 (patch)
tree32bd06ca9c74a49a247d5e7892fe58caba28a3b0
parent764a7a0e9f1e16cef58d23a2703966a94cce12e3 (diff)
downloadpublic-inbox-bbb8c7788ebaa7f3679d387725ee1998f0b2f615.tar.gz
It doesn't seem to be used anywhere
-rw-r--r--lib/PublicInbox/SearchMsg.pm18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index c7787ea1..5a2ca83b 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -157,29 +157,17 @@ sub references {
         defined $x ? $x : '';
 }
 
-sub _get_term_val ($$$) {
-        my ($self, $pfx, $re) = @_;
-        my $doc = $self->{doc};
-        my $end = $doc->termlist_end;
-        my $i = $doc->termlist_begin;
-        $i->skip_to($pfx);
-        if ($i != $end) {
-                my $val = $i->get_termname;
-                $val =~ s/$re// and return $val;
-        }
-        undef;
-}
-
 sub mid ($;$) {
         my ($self, $mid) = @_;
 
         if (defined $mid) {
                 $self->{mid} = $mid;
-        } elsif (my $rv = $self->{mid}) {
+        } elsif (defined(my $rv = $self->{mid})) {
                 $rv;
         } elsif ($self->{doc}) {
-                $self->{mid} = _get_term_val($self, 'Q', qr/\AQ/);
+                die "SHOULD NOT HAPPEN\n";
         } else {
+                die "NO {mime} for mid\n" unless $self->{mime};
                 $self->_extract_mid; # v1 w/o Xapian
         }
 }