mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Fixed snippet to return the proper error.
This commit is contained in:
parent
0fbcebaaec
commit
2e1f75acc4
@ -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));
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user