From baef1327f4583a576f6bada990ead9e9555b11f9 Mon Sep 17 00:00:00 2001 From: Swaroop C H Date: Wed, 13 May 2015 09:49:11 -0700 Subject: [PATCH 1/2] Add link to Debug trait I don't recall reading about this `Debug` trait so far in the book. --- src/doc/trpl/error-handling.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index b3689968b7fd1..d3e5d17ff4054 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -181,6 +181,8 @@ match version { This function makes use of an enum, `ParseError`, to enumerate the various errors that can occur. +The [`Debug`](../core/fmt/trait.Debug.html) trait is what let's us print the enum value using the `{:?}` format operation. + # Non-recoverable errors with `panic!` In the case of an error that is unexpected and not recoverable, the `panic!` From f6e5369e53f5444240aa983c6e6be6725932e399 Mon Sep 17 00:00:00 2001 From: Swaroop C H Date: Wed, 13 May 2015 13:23:10 -0700 Subject: [PATCH 2/2] trpl/error-handling - fix typo --- src/doc/trpl/error-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index d3e5d17ff4054..dcaf698fd3c9d 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -181,7 +181,7 @@ match version { This function makes use of an enum, `ParseError`, to enumerate the various errors that can occur. -The [`Debug`](../core/fmt/trait.Debug.html) trait is what let's us print the enum value using the `{:?}` format operation. +The [`Debug`](../std/fmt/trait.Debug.html) trait is what lets us print the enum value using the `{:?}` format operation. # Non-recoverable errors with `panic!`