Skip to content

Commit 2e1f75a

Browse files
author
Jose Narvaez
committed
Fixed snippet to return the proper error.
1 parent 0fbceba commit 2e1f75a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/trpl/error-handling.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ is very wrong. Wrong enough that we can't continue with things in the current
5050
state. Another example is using the `unreachable!()` macro:
5151

5252
```rust,ignore
53+
use Event::NewRelease;
54+
5355
enum Event {
5456
NewRelease,
5557
}
@@ -71,7 +73,7 @@ fn descriptive_probability(event: Event) -> &'static str {
7173
}
7274
7375
fn main() {
74-
std::io::println(descriptive_probability(NewRelease));
76+
println!("{}", descriptive_probability(NewRelease));
7577
}
7678
```
7779

0 commit comments

Comments
 (0)