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.
Right now,
PathBuilder::finish()
returns anOption<Path>
. However, this means that, if the function fails, the allocations used in thePathBuilder
are lost. In the interest of preventing unnecessary allocations, it would be nice if there was some error type inPathBuilder::finish()
that returned the cleared path.