TruePath icon indicating copy to clipboard operation
TruePath copied to clipboard

`AbsolutePath::Parent` should not re-check the path's absoluteness

Open ForNeVeR opened this issue 2 months ago • 2 comments

Current implementation of AbsolutePath::Parent just creates a new AbsolutePath instance, which will perform a check for path's absoluteness (absolution?).

We should consider optimizing that case, since a parent of a known absolute path is guaranteed to be absolute itself (if it is present at all).

Perhaps introduce an private method to create instances of AbsolutePath unchecked?

See TODO[#17] in the code when implementing this.

ForNeVeR avatar Apr 21 '24 18:04 ForNeVeR