Skip to content

Suggestion: Clarify instructions for errors4.rs #2239

Open
@unnamedplay-r

Description

@unnamedplay-r

Hi Rustlings team,

I recently completed the errors4.rs exercise, and while I eventually figured it out thanks to the helpful tests, I initially found the instructions a bit terse. The sole comment in the new function:

// TODO: This function shouldn't always return an `Ok`.

was somewhat cryptic on its own, and it wasn't immediately clear what the desired behavior was without looking at the test suite.

I think adding a comment similar to the one in if2.rs could provide a more direct initial goal for the learner. For example:

// TODO: This function shouldn't always return an `Ok`.
// Read the tests in main to understand the desired behavior.

I hope this could help make errors4.rs less initially confusing for learners.

Outside of the suggestion, I wanted to express my sincere gratitude for creating and maintaining Rustlings. It's been an incredibly helpful and fun resource for learning Rust, and I've been enjoying working through the exercises. Thank you for your hard work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions