Put Error impl block below Display

In an effort to be uniform throughout the codebase; put the
`std::error::Error` impl block below the `Display` impl block.
This commit is contained in:
Tobin C. Harding 2022-05-04 15:08:33 +10:00
parent 2384712364
commit 7cf8af2f86
1 changed files with 4 additions and 4 deletions

View File

@ -74,10 +74,6 @@ pub enum Error {
Io(io::Error), Io(io::Error),
} }
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl ::std::error::Error for Error {}
impl Display for Error { impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
match *self { match *self {
@ -87,6 +83,10 @@ impl Display for Error {
} }
} }
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl ::std::error::Error for Error {}
impl From<io::Error> for Error { impl From<io::Error> for Error {
fn from(io: io::Error) -> Self { fn from(io: io::Error) -> Self {
Error::Io(io) Error::Io(io)