1
Fork 0

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:
bors 2017-06-04 23:35:21 +00:00
commit c94a9ac8ae

View file

@ -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)