Skip to content

Commit

Permalink
Added anchors for the code snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherdumas committed Sep 15, 2015
1 parent 320880e commit b69a511
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/doc/trpl/error-handling.md
Expand Up @@ -87,7 +87,9 @@ thread '<main>' panicked at 'Invalid number: 11', src/bin/panic-simple.rs:5
Here's another example that is slightly less contrived. A program that accepts
an integer as an argument, doubles it and prints it.

<a name="code-unwrap-double"/>
```rust,should_panic
use std::env;
fn main() {
Expand Down Expand Up @@ -137,6 +139,7 @@ system is an important concept because it will cause the compiler to force the
programmer to handle that absence. Let's take a look at an example that tries
to find a character in a string:

<a name="code-option-ex-string-find"/>
```rust
// Searches `haystack` for the Unicode character `needle`. If one is found, the
// byte offset of the character is returned. Otherwise, `None` is returned.
Expand Down

0 comments on commit b69a511

Please sign in to comment.