Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/error/multiple_error_types/reenter_question_mark.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Here, we rewrite the previous example using `?`. As a result, the
```rust,editable
use std::error;
use std::fmt;
use std::num::ParseIntError;

// Change the alias to `Box<error::Error>`.
type Result<T> = std::result::Result<T, Box<error::Error>>;
Expand Down
3 changes: 3 additions & 0 deletions src/error/result/enter_question_mark.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ at older code. The same `multiply` function from the previous example
would look like this using `try!`:

```rust,editable
// To compile and run this example without errors, while using Cargo, change the value
// of the `edition` field, in the `[package]` section of the `Cargo.toml` file, to "2015".

use std::num::ParseIntError;

fn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {
Expand Down