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

Sentence "The bad state is not something that’s *expected* to happen occasionally." could be written more clearly. #2833

Closed
2 tasks done
mzagrabe opened this issue Aug 18, 2021 · 1 comment · Fixed by rust-lang/rust#90294
Milestone

Comments

@mzagrabe
Copy link

  • I have checked the latest main branch to see if this has already been fixed
  • I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem:

https://github.com/rust-lang/book/blob/main/src/ch09-03-to-panic-or-not-to-panic.md

Description of the problem:

Thank you for writing the Rust Book. It is appreciated and I am learning many things. Kudos to a job well done!

The sentence,

"* The bad state is not something that’s expected to happen occasionally."

does not read well. The three words, "not", "expected", and "occasionally" force the reader to make cognitive switches about when it is proper to panic! for "bad state". I'm still not sure about when this bullet point would apply to the context of the section it resides in.

Suggested fix:

Perhaps:

"The bad state is something that is unexpected and occurs infrequently."

Maybe also provide an example for each of the three bullet points in this section.

@carols10cents carols10cents added this to the ch9 milestone Sep 18, 2021
@carols10cents
Copy link
Member

Thank you, great suggestions!

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 26, 2021
Update books

## nomicon

3 commits in 2d66852a27c5d0ec50ae021820d1de22caa2b1bd..358e6a61d5f4f0496d0a81e70cdcd25d05307342
2021-10-07 19:00:37 +0900 to 2021-10-20 11:23:12 -0700
- Write a basic "call Rust from C" example (rust-lang/nomicon#296)
- Clarify the Safe vs. Unsafe Rust relationship (rust-lang/nomicon#294)
- Fix typo with respect to dangling pointer (rust-lang/nomicon#319)

## book

8 commits in eb1282ec444db94055fa9531b6f3f803e86bb382..fd9299792852c9a368cb236748781852f75cdac6
2021-09-16 21:17:09 -0400 to 2021-10-22 21:59:46 -0400
- Reword description to emphasize what return does in a match arm
- Correct backwards wording describing From impls. Fixes rust-lang/book#2829
- Remove multiple negatives, add examples. Fixes rust-lang/book#2833
- Fix capitalization in sidebar. Fixes rust-lang/book#2860
- fix quotes
- comments from nostarch and responses for chapter 2
-  (rust-lang/book#2906)
- Merge pull request rust-lang/book#2892 from Enrico2/patch-1

## rust-by-example

1 commits in 9a60624fcad0140826c44389571dc622917cd632..27f1ff5e440ef78828b68ab882b98e1b10d9af32
2021-10-04 08:13:53 -0300 to 2021-10-13 08:04:40 -0300
- Added example of `impl Trait` as an argument (rust-lang/rust-by-example#1468)

## embedded-book

1 commits in 270fccd339e5972d9c900e788f197e81a0bcd956..51739471276b1776dea27cf562b974ef07e24685
2021-10-06 16:28:48 +0000 to 2021-10-17 16:48:42 +0000
- Fix typo in 'The Borrow Checker'  (rust-embedded/book#305)
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 a pull request may close this issue.

2 participants