diff --git a/src/error.rs b/src/error.rs index 7c37c14..58f8d0a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -75,8 +75,8 @@ pub enum Error { #[allow(dead_code)] UserFunctionError(Box), - /// Error available for the implementors of the `FromSql` trait. - Other(Box), + /// Error available for the implementors of the `ToSql` trait. + ToSqlConversionFailure(Box), } impl From 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), } } }