inline io::Error creation from ErrorKind

This commit is contained in:
arthurprs 2017-06-04 19:45:44 +02:00
parent 81734e0e06
commit 4bda94d0d8

View File

@ -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<ErrorKind> for Error {
#[inline]
fn from(kind: ErrorKind) -> Error {
Error {
repr: Repr::Simple(kind)