Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/doc/trpl/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn descriptive_probability(event: Event) -> &'static str {
}

fn main() {
std::io::println(descriptive_probability(NewRelease));
println!("{}", descriptive_probability(Event::NewRelease));
}
```

Expand All @@ -85,8 +85,6 @@ While we know that we've covered all possible cases, Rust can't tell. It
doesn't know that probability is between 0.0 and 1.0. So we add another case:

```rust
use Event::NewRelease;

enum Event {
NewRelease,
}
Expand All @@ -109,7 +107,7 @@ fn descriptive_probability(event: Event) -> &'static str {
}

fn main() {
println!("{}", descriptive_probability(NewRelease));
println!("{}", descriptive_probability(Event::NewRelease));
}
```

Expand Down