Skip to content

Use infallible conversion to teach From trait#2386

Open
senekor wants to merge 1 commit intorust-lang:mainfrom
senekor:senekor/lxuqllrrmroy
Open

Use infallible conversion to teach From trait#2386
senekor wants to merge 1 commit intorust-lang:mainfrom
senekor:senekor/lxuqllrrmroy

Conversation

@senekor
Copy link
Copy Markdown
Contributor

@senekor senekor commented May 3, 2026

The From trait should only be implemented if the conversion is infallible. The previous exercise design used a fallible conversion with a fallback to a default value, with is bad practice.

closes #2225

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.

Incorrect answer passed in from_into.rs

1 participant