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

Try from delegate #1048

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Try from delegate #1048

wants to merge 2 commits into from

Conversation

ranfdev
Copy link
Member

@ranfdev ranfdev commented Mar 7, 2023

Currently if the conversion fails, the code will just panic. This isn't any different from str::from_value, which panics on invalid utf-8.
related #1047

@ranfdev ranfdev requested a review from pbor March 7, 2023 21:59
@sdroege
Copy link
Member

sdroege commented Mar 8, 2023

I think this should come with some refactoring of FromValue so that you can a) return the TryFrom::Error here, and b) don't need to call TryFrom twice for checking and extraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants