Skip to content

Commit

Permalink
Auto merge of rust-lang#42426 - arthurprs:io_error, r=sfackler
Browse files Browse the repository at this point in the history
Inline io::Error creation from ErrorKind

Faster and smaller code for mio and tokio (PRs on those to follow)
  • Loading branch information
bors committed Jun 4, 2017
2 parents 0418fa9 + 4bda94d commit c94a9ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/io/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c94a9ac

Please sign in to comment.