more documentation and formatting

This commit is contained in:
Harald Hoyer 2020-09-01 21:17:56 +02:00
parent ed710fada3
commit 1654624c08
Signed by: harald
GPG key ID: 900F3C4971086004
8 changed files with 50 additions and 39 deletions

View file

@ -5,7 +5,7 @@
- [Simple String Errors](tutorial1.md)
- [Simple Chained String Errors](tutorial2.md)
- [Mapping Errors](tutorial3.md)
- [Saving coding chars](tutorial4.md)
- [More Information](tutorial4.md)
- [The source() of Errors](tutorial5.md)
- [Downcast the Errors](tutorial6.md)
- [The root cause of all Errors](tutorial7.md)
@ -17,4 +17,4 @@
- [Writing a library](tutorial13.md)
- [Going back to std](tutorial14.md)
[The End](end.md)
[The End](end.md)

View file

@ -5,9 +5,6 @@ To cope with different kind of errors, we introduce the kind of an error `Func1E
Because we derive `Debug` and implement `Display` our `Func1ErrorKind` enum, this enum can be used as
a `std::error::Error`.
Not using `String` errors anymore, the `context()` function seen in the beginning of
the tutorial can be used again.
Only returning `Func1ErrorKind` in `func1()` now let us get rid of `Result<(), Box<Error + Send + Sync>>` and we can
use `ChainResult<(), Func1ErrorKind>`.

View file

@ -1,6 +1,6 @@
# Debug for the ErrorKind
One small improvement at the end of the tutorial is to fix the debug output of
One small improvement is to fix the debug output of
`Func1ErrorKind`. As you probably noticed, the output doesn't say much of the enum.
~~~