Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Why sometimes there is little to no information on how to implement some code #180

Copy link
Copy link
@phoscoder

Description

@phoscoder
Issue body actions

I checked this https://github.com/rustfinity/rustfinity/edit/main/challenges/graceful-error-handling-2/description.md

It requires me to implement the Display trait

And I had to whoop something like this fwith the help of Claude

impl fmt::Display for ParsePercentageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            ParsePercentageError::InvalidInput => write!(f, "Invalid input"),
            ParsePercentageError::OutOfRange => write!(f, "Percentage out of range")
        }
    }
}

Whilst I am a beginner, personally I agree that its ok for learning how fill the gaps for themselves but for a complete beginner who differs from this way of thinking it will be hell

Could you add a tutorial for implementing these traits and why they need to be implement

I am open to collab

Kudos

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.