]> Sergey Matveev's repositories - public-inbox.git/commitdiff
smsg: get rid of ->wrap initializer, too
authorEric Wong <e@yhbt.net>
Mon, 1 Jun 2020 10:06:50 +0000 (10:06 +0000)
committerEric Wong <e@yhbt.net>
Wed, 3 Jun 2020 04:04:21 +0000 (04:04 +0000)
We'll just use `bless' like most current PublicInbox::Smsg callers.

lib/PublicInbox/SearchIdx.pm
lib/PublicInbox/Smsg.pm

index eb228e6bba7fc9089f1793c51a2370815d345c80..f10a9104e789fe82beae8e8a7b98d3ec9932f6c9 100644 (file)
@@ -484,7 +484,7 @@ sub remove_by_oid {
        for (; $head != $tail; $head++) {
                my $docid = $head->get_docid;
                my $doc = $db->get_document($docid);
-               my $smsg = PublicInbox::Smsg->wrap($mid);
+               my $smsg = bless { mid => $mid }, 'PublicInbox::Smsg';
                $smsg->load_expand($doc);
                if ($smsg->{blob} eq $oid) {
                        push(@delete, $docid);
index 8e2771274a186245473290de36dc700bef9f84c9..446bca81b48637d400983f9721ec683079342632 100644 (file)
@@ -17,11 +17,6 @@ use PublicInbox::Address;
 use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
 use Time::Local qw(timegm);
 
-sub wrap {
-       my ($class, $mid) = @_;
-       bless { mid => $mid }, $class;
-}
-
 sub get_val ($$) {
        my ($doc, $col) = @_;
        # sortable_unserialise is defined by PublicInbox::Search::load_xapian()