]> git.lizzy.rs Git - rust.git/commitdiff
Fix option link and anchor links.
authorchristopherdumas <christopherdumas@me.com>
Tue, 15 Sep 2015 14:54:43 +0000 (07:54 -0700)
committerchristopherdumas <christopherdumas@me.com>
Tue, 15 Sep 2015 17:37:02 +0000 (10:37 -0700)
src/doc/trpl/error-handling.md

index 673dc950ecce4187f0aaa39547747d7c99b6c76d..f4a156ee9214f730eca16147ef277dc9b216a279 100644 (file)
@@ -24,7 +24,7 @@ systems may want to jump around.
 * [The Basics](#the-basics)
     * [Unwrapping explained](#unwrapping-explained)
     * [The `Option` type](#the-option-type)
-        * [Composing `Option<T>` values](#composing-optiont-values)
+        * [Composing `Option<T>` values](#composing-option<t>-values)
     * [The `Result` type](#the-result-type)
         * [Parsing integers](#parsing-integers)
         * [The `Result` type alias idiom](#the-result-type-alias-idiom)
@@ -33,19 +33,19 @@ systems may want to jump around.
     * [Composing `Option` and `Result`](#composing-option-and-result)
     * [The limits of combinators](#the-limits-of-combinators)
     * [Early returns](#early-returns)
-    * [The `try!` macro](#the-try-macro)
+    * [The `try!` macro](#the-try!-macro)
     * [Defining your own error type](#defining-your-own-error-type)
 * [Standard library traits used for error handling](#standard-library-traits-used-for-error-handling)
     * [The `Error` trait](#the-error-trait)
     * [The `From` trait](#the-from-trait)
-    * [The real `try!` macro](#the-real-try-macro)
+    * [The real `try!` macro](#the-real-try!-macro)
     * [Composing custom error types](#composing-custom-error-types)
     * [Advice for library writers](#advice-for-library-writers)
 * [Case study: A program to read population data](#case-study-a-program-to-read-population-data)
     * [Initial setup](#initial-setup)
     * [Argument parsing](#argument-parsing)
     * [Writing the logic](#writing-the-logic)
-    * [Error handling with `Box<Error>`](#error-handling-with-boxerror)
+    * [Error handling with `Box<Error>`](#error-handling-with-box<error>)
     * [Reading from stdin](#reading-from-stdin)
     * [Error handling with a custom type](#error-handling-with-a-custom-type)
     * [Adding functionality](#adding-functionality)
@@ -120,10 +120,9 @@ It would be better if we just showed the code for unwrapping because it is so
 simple, but to do that, we will first need to explore the `Option` and `Result`
 types. Both of these types have a method called `unwrap` defined on them.
 
-## The `Option` type
+### The `Option` type
 
-The `Option` type is
-[defined in the standard library][1]: 
+The `Option` type is [defined in the standard library][5]:
 
 ```rust
 enum Option<T> {