mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
b742594f4a
Add `io::Error::other` This PR adds a small utility constructor, `io::Error::other`, a shorthand for `io::Error::new(io::ErrorKind::Other, err)`, something I find myself writing often. For some concrete stats, a quick search on [grep.app](https://grep.app) shows that more than half of the uses of `io::Error::new` use `ErrorKind::Other`: ``` Error::new\((?:std::)?(?:io::)?ErrorKind:: => 3,898 results Error::new\((?:std::)?(?:io::)?ErrorKind::Other => 2,186 results ``` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@b02ed04a7e | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@0716b22e90 | ||
test | ||
unwind |