Fixed snippet to return the proper error.

This commit is contained in:
Jose Narvaez 2015-07-13 20:54:33 +01:00
parent 0fbcebaaec
commit 2e1f75acc4

View file

@ -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: state. Another example is using the `unreachable!()` macro:
```rust,ignore ```rust,ignore
use Event::NewRelease;
enum Event { enum Event {
NewRelease, NewRelease,
} }
@ -71,7 +73,7 @@ fn descriptive_probability(event: Event) -> &'static str {
} }
fn main() { fn main() {
std::io::println(descriptive_probability(NewRelease)); println!("{}", descriptive_probability(NewRelease));
} }
``` ```