mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-24 20:43:07 +00:00
Add error-chain links and slightly improve formatting
This commit is contained in:
parent
02a3497a35
commit
020e81e7fb
1 changed files with 8 additions and 6 deletions
14
README.md
14
README.md
|
@ -2,15 +2,15 @@
|
|||
|
||||
A practical guide to the Rust crate ecosystem.
|
||||
|
||||
[Read and write integers in little-endian byte order](pages/byteorder.md)
|
||||
[![byteorder][byteorder-badge]][byteorder]
|
||||
## Recipes
|
||||
### [Byteorder](pages/byteorder.md) [![byteorder][byteorder-badge]][byteorder]
|
||||
|
||||
|
||||
# A note about error handling
|
||||
## A note about error handling
|
||||
|
||||
Error handling in Rust is robust when done correctly, but in today's
|
||||
Rust it requires a fair bit of boilerplate. Because of this one often
|
||||
seees Rust examples filled with `unwrap` calls instead of proper error
|
||||
sees Rust examples filled with `unwrap` calls instead of proper error
|
||||
handling.
|
||||
|
||||
Since these recipes are intended to be reused as-is and encourage best
|
||||
|
@ -49,10 +49,10 @@ and `Result` type, along with an automatic conversion from
|
|||
the common `::std::io::Error` type. The automatic conversion
|
||||
makes the `?` operator work
|
||||
|
||||
For more background on error handling in Rust, read TODO and TODO.
|
||||
For more background on error handling in Rust, read [this page of the Rust book][error-docs] and [this blog post][error-blog].
|
||||
|
||||
|
||||
# License
|
||||
## License
|
||||
|
||||
MIT/Apache-2.0
|
||||
|
||||
|
@ -61,3 +61,5 @@ MIT/Apache-2.0
|
|||
|
||||
[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg
|
||||
[byteorder]: https://docs.rs/byteorder
|
||||
[error-docs]: https://doc.rust-lang.org/book/error-handling.html
|
||||
[error-blog]: https://brson.github.io/2016/11/30/starting-with-error-chain
|
||||
|
|
Loading…
Reference in a new issue