Auto merge of #42426 - arthurprs:io_error, r=sfackler
Inline io::Error creation from ErrorKind Faster and smaller code for mio and tokio (PRs on those to follow)
This commit is contained in:
commit
c94a9ac8ae
1 changed files with 1 additions and 0 deletions
|
@ -208,6 +208,7 @@ impl ErrorKind {
|
|||
/// the heap (for normal construction via Error::new) is too costly.
|
||||
#[stable(feature = "io_error_from_errorkind", since = "1.14.0")]
|
||||
impl From<ErrorKind> for Error {
|
||||
#[inline]
|
||||
fn from(kind: ErrorKind) -> Error {
|
||||
Error {
|
||||
repr: Repr::Simple(kind)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue