RazrFalcon / tiny-skia

A tiny Skia subset ported to Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a way to recover a PathBuilder from a failed finish()

notgull opened this issue · comments

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.

This would be an extremely rare case and increasing the API complexity isn't worth it.