Closed grahamc closed 5 years ago
Did you guys just submit a PR and a corresponding issue within one minute? 😂
Updated to implement #6's API.
We work together, and were discussing the quirk of the API... and both of us have a bent on contributing to OSS ;)
Thanks, I will release a new version soon, through this is a braking change.
So I will go through the API to see if there are any other API improvements.
Thanks!
The previous error case of returning the original Vec makes the API a bit awkward.
Rust's
?
operator can't be used without implementing From on a Vec:I can see how this API came to be: by moving the variable in to the function, you can't get it back in the error case. However, because the Vec is empty, there is no reason to want it back anyway.