mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-29 21:52:12 +08:00
Rename Error::Other to Error::ToSqlConversionFailure
This commit is contained in:
parent
022f1e8671
commit
dde762bf0e
10
src/error.rs
10
src/error.rs
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user