From 2e1f75acc48ba084f5bd24ec75ec831de6a5677a Mon Sep 17 00:00:00 2001 From: Jose Narvaez Date: Mon, 13 Jul 2015 20:54:33 +0100 Subject: [PATCH] Fixed snippet to return the proper error. --- src/doc/trpl/error-handling.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index 580eaa6ca5571..8dd5a3650ef52 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -50,6 +50,8 @@ is very wrong. Wrong enough that we can't continue with things in the current state. Another example is using the `unreachable!()` macro: ```rust,ignore +use Event::NewRelease; + enum Event { NewRelease, } @@ -71,7 +73,7 @@ fn descriptive_probability(event: Event) -> &'static str { } fn main() { - std::io::println(descriptive_probability(NewRelease)); + println!("{}", descriptive_probability(NewRelease)); } ```