diff options
author | Eric Wong <e@80x24.org> | 2021-01-27 03:42:22 -0600 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-29 05:04:40 +0000 |
commit | eb7fd8fdd59862b5ddea07f1a4bc9a946245ad14 (patch) | |
tree | 5fcc537db520a4dee11f0ec9b18fe0d082726c51 /lib/PublicInbox/Eml.pm | |
parent | da86f10a548d4cce25f91bb4063f82ecbbe441a1 (diff) | |
download | public-inbox-eb7fd8fdd59862b5ddea07f1a4bc9a946245ad14.tar.gz |
Where applicable, index() is faster than entering the regexp engine and we favor it in several other places, as well.
Diffstat (limited to 'lib/PublicInbox/Eml.pm')
-rw-r--r-- | lib/PublicInbox/Eml.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Eml.pm b/lib/PublicInbox/Eml.pm index 462d51fc..bd27f19b 100644 --- a/lib/PublicInbox/Eml.pm +++ b/lib/PublicInbox/Eml.pm @@ -217,7 +217,7 @@ sub mp_descend ($$) { # There's also a case where quoted text showed up in the # preamble # <20060515162817.65F0F1BBAE@citi.umich.edu> - unshift(@parts, new_sub(undef, \$pre)) if $pre =~ /:/s; + unshift(@parts, new_sub(undef, \$pre)) if index($pre, ':') >= 0; return \@parts; } # "multipart", but no boundary found, treat as single part |