Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update rust error
authored
Nov 29, 2021
by
umaumax
Show whitespace changes
Inline
Side-by-side
rust/rust-error.md
View page @
02c42fba
...
...
@@ -267,3 +267,9 @@ fn main() -> Result<(), std::io::Error> {
Ok
(())
}
```
## 型変換
### `Box<dyn std::error::Error>` to `anyhow::Error`
```
rust
box_error
.map_err
(|
e
|
anyhow
::
anyhow!
(
"{}"
,
e
))
?
;
```
\ No newline at end of file