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

There may be an error in Chapter 9.2. #2829

Closed
L4nterns opened this issue Aug 15, 2021 · 1 comment · Fixed by rust-lang/rust#90294
Closed

There may be an error in Chapter 9.2. #2829

L4nterns opened this issue Aug 15, 2021 · 1 comment · Fixed by rust-lang/rust#90294
Milestone

Comments

@L4nterns
Copy link

The following is the original content of the book:

As long as each error type implements the from function to define how to convert itself to the returned error type, the ? operator takes care of the conversion automatically.

I have consulted the following the following information:

https://doc.rust-lang.org/std/convert/trait.From.html

The from function should be implemented by the returned error type, not the "each error type", right?

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

You're absolutely right. Great catch! 🎣

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