mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +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 ``` |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |