Update result.md

pull/458/head
spike 3 years ago committed by GitHub
parent 585ca61bc8
commit 079022659c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -119,7 +119,7 @@ thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { cod
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
`expect``unwrap` 很像,也是遇到错误直接 panic, 但是会带上自定义的错误提示信息,相当于重载了错误打印的函数:
`expect``unwrap` 很像,也是遇到错误直接 `panic`, 但是会带上自定义的错误提示信息,相当于重载了错误打印的函数:
```rust
use std::fs::File;

Loading…
Cancel
Save