inline io::Error creation from ErrorKind
This commit is contained in:
parent
81734e0e06
commit
4bda94d0d8
|
@ -208,6 +208,7 @@ impl ErrorKind {
|
||||||
/// the heap (for normal construction via Error::new) is too costly.
|
/// the heap (for normal construction via Error::new) is too costly.
|
||||||
#[stable(feature = "io_error_from_errorkind", since = "1.14.0")]
|
#[stable(feature = "io_error_from_errorkind", since = "1.14.0")]
|
||||||
impl From<ErrorKind> for Error {
|
impl From<ErrorKind> for Error {
|
||||||
|
#[inline]
|
||||||
fn from(kind: ErrorKind) -> Error {
|
fn from(kind: ErrorKind) -> Error {
|
||||||
Error {
|
Error {
|
||||||
repr: Repr::Simple(kind)
|
repr: Repr::Simple(kind)
|
||||||
|
|
Loading…
Reference in a new issue