From 62b80b61d334361677e26e9ddb966e6bc5f8635d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Jun 2020 10:06:56 +0000 Subject: smsg: remove remaining accessor methods We'll continue to favor simpler data models that can be used directly rather than wasting time and memory with accessor APIs. The ->from, ->to, -cc, ->mid, ->subject, >references methods can all be trivially replaced by hash lookups since all their values are stored in doc_data. Most remaining callers of those methods were test cases, anyways. ->from_name is only used in the PSGI code, so we can just use ->psgi_cull to take care of populating the {from_name} field. --- lib/PublicInbox/ExtMsg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/ExtMsg.pm') diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm index 1d17c2ce..d7917b34 100644 --- a/lib/PublicInbox/ExtMsg.pm +++ b/lib/PublicInbox/ExtMsg.pm @@ -30,7 +30,7 @@ our @EXT_URL = map { ascii_html($_) } ( sub PARTIAL_MAX () { 100 } sub mids_from_mset { # Search::retry_reopen callback - [ map { PublicInbox::Smsg::from_mitem($_)->mid } $_[0]->items ]; + [ map { PublicInbox::Smsg::from_mitem($_)->{mid} } $_[0]->items ]; } sub search_partial ($$) { -- cgit v1.2.3-24-ge0c7