Skip to content

Commit ea86d74

Browse files
authored
Fix typo (#61)
1 parent 5dd2a35 commit ea86d74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/docs/e5.error_and_none_propagation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
}
2323

2424
fn complex_function() -> Option<&'static str> {
25-
let x = get_an_optional_value()?; // if None, returns immidiately; if Some("abc"), set x to "abc"
25+
let x = get_an_optional_value()?; // if None, returns immediately; if Some("abc"), set x to "abc"
2626

2727
// some other code, ex
2828
println!("{}", x); // "abc" ; if you change line 19 `false` to `true`
@@ -54,7 +54,7 @@ fn main() {
5454
}
5555

5656
fn complex_function() -> Result<u64, String> {
57-
let x = function_with_error()?; // if Err, returns immidiately; if Ok(255), set x to 255
57+
let x = function_with_error()?; // if Err, returns immediately; if Ok(255), set x to 255
5858

5959
// some other code, ex
6060
println!("{}", x); // 255 ; if you change line 20 `true` to `false`
@@ -108,4 +108,4 @@ fn main() -> std::io::Result<()> {
108108
// Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
109109
```
110110

111-
> 💯 If you want to know about the all kind of errors `std::fs::File::open()` can produce, check the [error list on `std::fs::OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#errors).
111+
> 💯 If you want to know about the all kind of errors `std::fs::File::open()` can produce, check the [error list on `std::fs::OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#errors).

0 commit comments

Comments
 (0)