Merge pull request #55 from szTheory/patch-2

Fix in-line code sample backtick formatting
This commit is contained in:
Dhghomon 2020-08-03 11:44:11 +09:00 committed by GitHub
commit c14761f3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3999,7 +3999,7 @@ fn main() {
}
```
The message is: `thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\main.rs:2:32`. We're not sure if it was the first `.unwrap()` or the second `.unwrap()` until we check the line. It would be better to check the length and also to not unwrap. But with `.expect()` at least it will be a *little* better. Here it is with `.expect()`:
The message is: ``thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\main.rs:2:32``. We're not sure if it was the first `.unwrap()` or the second `.unwrap()` until we check the line. It would be better to check the length and also to not unwrap. But with `.expect()` at least it will be a *little* better. Here it is with `.expect()`:
```rust
fn try_two_unwraps(input: Vec<Option<i32>>) {