We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It’d be more efficient to have release() consume self and return the PathBuf:
release()
self
PathBuf
pub fn release(self) -> PathBuf { let path = mem::replace(&mut self.path, PathBuf::new()); mem::forget(self); path }
That way you don’t need to allocate twice just to get the path out as a PathBuf.
This also allows you to scrap the flag _release altogether.
_release
The text was updated successfully, but these errors were encountered:
Version 0.4.0 does something like this now! Thanks for the suggestion.
Sorry, something went wrong.
No branches or pull requests
It’d be more efficient to have
release()
consumeself
and return thePathBuf
:That way you don’t need to allocate twice just to get the path out as a
PathBuf
.This also allows you to scrap the flag
_release
altogether.The text was updated successfully, but these errors were encountered: