From e38f07d8d796ee3e8669bec9cdae57fa115d2f90 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Tue, 17 Jul 2018 12:32:14 -0400 Subject: [PATCH] fix the build --- 2018-edition/src/ch09-02-recoverable-errors-with-result.md | 2 +- 2018-edition/src/ch19-02-advanced-lifetimes.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/2018-edition/src/ch09-02-recoverable-errors-with-result.md b/2018-edition/src/ch09-02-recoverable-errors-with-result.md index 603e150f4..29b7d0b4d 100644 --- a/2018-edition/src/ch09-02-recoverable-errors-with-result.md +++ b/2018-edition/src/ch09-02-recoverable-errors-with-result.md @@ -193,7 +193,7 @@ In Chapter 13, we'll learn about closures. The `Result` type has many methods that accept a closure, and are implemented as `match` statements. A more seasoned Rustacean might write this: -```rust +```rust,ignore use std::fs::File; use std::io::ErrorKind; diff --git a/2018-edition/src/ch19-02-advanced-lifetimes.md b/2018-edition/src/ch19-02-advanced-lifetimes.md index 9a2cbe197..65de2f7c4 100644 --- a/2018-edition/src/ch19-02-advanced-lifetimes.md +++ b/2018-edition/src/ch19-02-advanced-lifetimes.md @@ -453,6 +453,7 @@ struct StrWrap<'a>(&'a str); We can write a function that returns one of these like this: ```rust +# struct StrWrap<'a>(&'a str); fn foo<'a>(string: &'a str) -> StrWrap<'a> { StrWrap(string) } @@ -462,6 +463,7 @@ But that's a lot of `'a`s! To cut down on some of this noise, we can use the anonymous lifetime, `'_`, like this: ```rust +# struct StrWrap<'a>(&'a str); fn foo(string: &str) -> StrWrap<'_> { StrWrap(string) }