Factorize code

This commit is contained in:
gwenn 2025-02-01 10:54:28 +01:00
parent dc11704820
commit 01e8511c9f

View File

@ -60,16 +60,8 @@ impl Sql {
let value = match value {
ToSqlOutput::Borrowed(v) => v,
ToSqlOutput::Owned(ref v) => ValueRef::from(v),
#[cfg(feature = "blob")]
ToSqlOutput::ZeroBlob(_) => {
return Err(err!(ffi::SQLITE_MISUSE, "Unsupported value \"{value:?}\""));
}
#[cfg(feature = "functions")]
ToSqlOutput::Arg(_) => {
return Err(err!(ffi::SQLITE_MISUSE, "Unsupported value \"{value:?}\""));
}
#[cfg(feature = "array")]
ToSqlOutput::Array(_) => {
#[cfg(any(feature = "blob", feature = "functions", feature = "array"))]
_ => {
return Err(err!(ffi::SQLITE_MISUSE, "Unsupported value \"{value:?}\""));
}
};