From 4bda94d0d820bf7baf2e97ec3552fe290b826391 Mon Sep 17 00:00:00 2001 From: arthurprs Date: Sun, 4 Jun 2017 19:45:44 +0200 Subject: [PATCH] inline io::Error creation from ErrorKind --- src/libstd/io/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index fb67eaf3c63..0a5804a7744 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -208,6 +208,7 @@ fn as_str(&self) -> &'static str { /// the heap (for normal construction via Error::new) is too costly. #[stable(feature = "io_error_from_errorkind", since = "1.14.0")] impl From for Error { + #[inline] fn from(kind: ErrorKind) -> Error { Error { repr: Repr::Simple(kind)