Add a way to recover a PathBuilder from a failed finish()
notgull opened this issue · comments
John Nunley commented
Right now, PathBuilder::finish()
returns an Option<Path>
. However, this means that, if the function fails, the allocations used in the PathBuilder
are lost. In the interest of preventing unnecessary allocations, it would be nice if there was some error type in PathBuilder::finish()
that returned the cleared path.
Yevhenii Reizner commented
This would be an extremely rare case and increasing the API complexity isn't worth it.