Skip to content
New issue

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

Allow returning Self instead of Option<Self> for Prep methods that always go to Ready #21

Open
uazu opened this issue Nov 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@uazu
Copy link
Owner

uazu commented Nov 4, 2021

Option provides a From implementation for T such that Option::from(val) on both T and Option<T> will result in Option<T>. So all Prep calls could be wrapped in Option::from(...) to handle both. This needs testing to check that it causes no issues. It also requires some consideration to be sure that it won't confuse coders who might forget that there's a way to delay moving to the Ready state.

@uazu uazu added the enhancement New feature or request label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant