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:
parent
2384712364
commit
7cf8af2f86
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue