diff options
author | Eric Wong <e@yhbt.net> | 2020-08-01 08:12:27 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-02 08:26:20 +0000 |
commit | 77eafbd653d2efac546f2c330d8cf5e84bef2712 (patch) | |
tree | f33da0a4570d14882262ea4ee60ad7982afe6b8a /lib/PublicInbox/OverIdx.pm | |
parent | fb4bfa102bfa702f13948ac689e54bac9d0084e0 (diff) | |
download | public-inbox-77eafbd653d2efac546f2c330d8cf5e84bef2712.tar.gz |
remove unnecessary ->header_obj calls
We used ->header_obj in the past as an optimization with Email::MIME. That optimization is no longer necessary with PublicInbox::Eml. This doesn't make any functional difference even if we were to go back to Email::MIME. However, it reduces the amount of code we have and slightly reduces allocations with PublicInbox::Eml.
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r-- | lib/PublicInbox/OverIdx.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index 5821c562..c8f61e01 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -271,11 +271,10 @@ sub subject_path ($) { } sub add_overview { - my ($self, $mime, $smsg) = @_; - $smsg->{lines} = $mime->body_raw =~ tr!\n!\n!; - my $hdr = $mime->header_obj; - my $mids = mids_for_index($hdr); - my $refs = parse_references($smsg, $hdr, $mids); + my ($self, $eml, $smsg) = @_; + $smsg->{lines} = $eml->body_raw =~ tr!\n!\n!; + my $mids = mids_for_index($eml); + my $refs = parse_references($smsg, $eml, $mids); my $subj = $smsg->{subject}; my $xpath; if ($subj ne '') { |