mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-24 21:58:13 +01:00
Fix reference to supertrait syntax in 09_error_trait.md (#124)
The [Error trait](https://rust-exercises.com/100-exercises/05_ticket_v2/09_error_trait.html?highlight=supertrait#the-error-trait) chapter states that the reader may recall the supertrait syntax from the [Sized trait](https://rust-exercises.com/100-exercises/04_traits/08_sized) chapter. Actually the syntax is introduced in the [From and Into](https://rust-exercises.com/100-exercises/04_traits/09_from) chapter instead. This PR amends the text accordingly.
This commit is contained in:
parent
96f06708b0
commit
2765fdaa0e
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ that implements the `Error` trait.
|
|||
pub trait Error: Debug + Display {}
|
||||
```
|
||||
|
||||
You might recall the `:` syntax from [the `Sized` trait](../04_traits/08_sized.md)—it's used to specify **supertraits**.
|
||||
You might recall the `:` syntax from [the `From` trait](../04_traits/09_from.md#supertrait--subtrait)—it's used to specify **supertraits**.
|
||||
For `Error`, there are two supertraits: `Debug` and `Display`. If a type wants to implement `Error`, it must also
|
||||
implement `Debug` and `Display`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue