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

? operator should be in the first, not last, sub-section of 18.4. Result #1836

Open
svetli97 opened this issue Apr 11, 2024 · 0 comments
Open

Comments

@svetli97
Copy link

Since the ? operator is in the last sub-section of 18.4. Result, all the other sub-sections and the main section are filled with code of the type:

let number = match number_str.parse::<i32>() {
    Ok(number)  => number,
    Err(e) => return Err(e),
};

This is really confusing. Especially for someone who is reading the sections in order because in 18.3. Option & unwrap, the ? operator is in the first sub-section. You are telling the reader what the good way of doing something is but then giving him 4 sections of code written in what you just described as the worse way of doing it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants