Rename Error::Other to Error::ToSqlConversionFailure

This commit is contained in:
Kelvin Ly 2017-05-30 19:22:14 -04:00
parent 022f1e8671
commit dde762bf0e

View File

@ -75,8 +75,8 @@ pub enum Error {
#[allow(dead_code)]
UserFunctionError(Box<error::Error + Send + Sync>),
/// Error available for the implementors of the `FromSql` trait.
Other(Box<error::Error + Send + Sync>),
/// Error available for the implementors of the `ToSql` trait.
ToSqlConversionFailure(Box<error::Error + Send + Sync>),
}
impl From<str::Utf8Error> for Error {
@ -131,7 +131,7 @@ impl fmt::Display for Error {
}
#[cfg(feature = "functions")]
Error::UserFunctionError(ref err) => err.fmt(f),
Error::Other(ref err) => err.fmt(f),
Error::ToSqlConversionFailure(ref err) => err.fmt(f),
}
}
}
@ -163,7 +163,7 @@ impl error::Error for Error {
Error::InvalidFunctionParameterType(_, _) => "invalid function parameter type",
#[cfg(feature = "functions")]
Error::UserFunctionError(ref err) => err.description(),
Error::Other(ref err) => err.description(),
Error::ToSqlConversionFailure(ref err) => err.description(),
}
}
@ -190,7 +190,7 @@ impl error::Error for Error {
#[cfg(feature = "functions")]
Error::UserFunctionError(ref err) => Some(&**err),
Error::Other(ref err) => Some(&**err),
Error::ToSqlConversionFailure(ref err) => Some(&**err),
}
}
}