From e67e97bb37589bdc212fcba53efdcf0c466d3120 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 25 May 2022 12:31:32 +1000 Subject: [PATCH] Put From impl below std::error::Error impl As we do for all the other error types put the `From` impl blocks below the `std::error::Erro` impl block. Refactor only, no logic changes. --- src/network/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/network/mod.rs b/src/network/mod.rs index 2686e0ef..507901b3 100644 --- a/src/network/mod.rs +++ b/src/network/mod.rs @@ -69,13 +69,6 @@ impl fmt::Display for Error { } } -#[doc(hidden)] -impl From for Error { - fn from(err: io::Error) -> Self { - Error::Io(err) - } -} - #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] impl std::error::Error for Error { @@ -88,3 +81,10 @@ impl std::error::Error for Error { } } } + +#[doc(hidden)] +impl From for Error { + fn from(err: io::Error) -> Self { + Error::Io(err) + } +}