Skip to content

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.

2 participants