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

string: replace From<&str> with TryFrom<&str> #395

Closed
wants to merge 1 commit into from

Conversation

newAM
Copy link
Member

@newAM newAM commented Oct 21, 2023

Fixes #381.

This is a breaking change.

The From trait is not allowed to fail: docs. The current implementation breaks this contract.

As-is TryFrom cannot be implemented to fix the usability issue raised in #381 because From provides TryFrom with type Error = Infallible.

@newAM newAM requested a review from Dirbaio October 21, 2023 09:19
@Dirbaio
Copy link
Member

Dirbaio commented Oct 30, 2023

needs changelog rebase

@newAM newAM closed this Oct 30, 2023
@newAM newAM deleted the impl-try-from-string branch October 30, 2023 21:21
@newAM newAM restored the impl-try-from-string branch October 30, 2023 21:21
@newAM newAM deleted the impl-try-from-string branch October 30, 2023 21:22
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.

Implement TryFrom<&str> for fallible conversion
2 participants