]> Sergey Matveev's repositories - public-inbox.git/commitdiff
smsg: inline _extract_mid functionality
authorEric Wong <e@yhbt.net>
Wed, 1 Apr 2020 06:16:18 +0000 (06:16 +0000)
committerEric Wong <e@yhbt.net>
Thu, 2 Apr 2020 10:27:42 +0000 (10:27 +0000)
No need to keep an extra sub which isn't called anywhere else,
and the mid_clean call is redundant since mid_mime already
plucks the msgid out of the angle brackets.

lib/PublicInbox/Smsg.pm

index 5eb0723f4257995832b7ba21c6fe8218f9f48a4e..7c90b92dabbcd7d764703e46b7bc31641aa1f526 100644 (file)
@@ -12,7 +12,7 @@ use strict;
 use warnings;
 use base qw(Exporter);
 our @EXPORT_OK = qw(subject_normalized);
-use PublicInbox::MID qw/mid_clean mid_mime/;
+use PublicInbox::MID qw/mid_mime/;
 use PublicInbox::Address;
 use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
 use Time::Local qw(timegm);
@@ -178,12 +178,10 @@ sub mid ($;$) {
                $rv;
        } else {
                die "NO {mime} for mid\n" unless $self->{mime};
-               $self->_extract_mid; # v1 w/o Xapian
+               mid_mime($self->{mime}) # v1 w/o Xapian
        }
 }
 
-sub _extract_mid { mid_clean(mid_mime($_[0]->{mime})) }
-
 our $REPLY_RE = qr/^re:\s+/i;
 
 sub subject_normalized ($) {