From: Eric Wong Date: Tue, 28 Nov 2023 14:56:16 +0000 (+0000) Subject: codesearch: eliminate redundant substitutions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1e472e1851b708750c7ac0927792fb38e22b8e9;p=thirdparty%2Fpublic-inbox.git codesearch: eliminate redundant substitutions We store the full path name and xap_terms already removes the `P' character, so the loop and substr calls are a no-op replacing `/' with `/'. --- diff --git a/lib/PublicInbox/CodeSearch.pm b/lib/PublicInbox/CodeSearch.pm index 9051d85f1..eb0575251 100644 --- a/lib/PublicInbox/CodeSearch.pm +++ b/lib/PublicInbox/CodeSearch.pm @@ -191,7 +191,6 @@ sub roots2paths { # for diagnostics } $size = $mset->size; } while ($size); - substr($_, 0, 1, '/') for @$dirs; # s!^P!/! @$dirs = sort @$dirs; } \%ret;