]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
codesearch: eliminate redundant substitutions
authorEric Wong <e@80x24.org>
Tue, 28 Nov 2023 14:56:16 +0000 (14:56 +0000)
committerEric Wong <e@80x24.org>
Wed, 29 Nov 2023 02:13:18 +0000 (02:13 +0000)
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 `/'.

lib/PublicInbox/CodeSearch.pm

index 9051d85f1c5941092e2ded98673ec1a3d40eb064..eb05752513ddb04845448d0281b76bbad02c436b 100644 (file)
@@ -191,7 +191,6 @@ sub roots2paths { # for diagnostics
                        }
                        $size = $mset->size;
                } while ($size);
-               substr($_, 0, 1, '/') for @$dirs; # s!^P!/!
                @$dirs = sort @$dirs;
        }
        \%ret;