inline io::Error creation from ErrorKind
This commit is contained in:
parent
81734e0e06
commit
4bda94d0d8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user