mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Auto merge of #42426 - arthurprs:io_error, r=sfackler
Inline io::Error creation from ErrorKind Faster and smaller code for mio and tokio (PRs on those to follow)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user