path: remove unnecessary string copies · nodejs/node@e82a914 · GitHub
Skip to content

Commit e82a914

Browse files
tniessenMylesBorins
authored andcommitted
path: remove unnecessary string copies
As the length of `path` is known at this point, there is no point in making an exact copy using `slice`. Backport-PR-URL: #14787 PR-URL: #14438 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
1 parent eefd322 commit e82a914

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/path.js

Lines changed: 6 additions & 4 deletions

0 commit comments

Comments
 (0)