diff options
author | Eric Wong <e@yhbt.net> | 2020-06-01 10:06:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-03 04:04:21 +0000 |
commit | 3ca8e5830e02bd42ea3b2b80733206c9aaafa4c0 (patch) | |
tree | 055aa38322e297cc2a61ad7450d21cd66c6eb33d /lib/PublicInbox | |
parent | 9ab886546cc89f37819e1ef09cb49fd9325b3a41 (diff) | |
download | public-inbox-3ca8e5830e02bd42ea3b2b80733206c9aaafa4c0.tar.gz |
smsg: get rid of ->wrap initializer, too
We'll just use `bless' like most current PublicInbox::Smsg callers.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/Smsg.pm | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index eb228e6b..f10a9104 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -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); diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm index 8e277127..446bca81 100644 --- a/lib/PublicInbox/Smsg.pm +++ b/lib/PublicInbox/Smsg.pm @@ -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() |