Move parameter count assertion above format encoding derivation
This commit is contained in:
parent
569689deaa
commit
8158eed052
@ -157,11 +157,6 @@ where
|
|||||||
I::IntoIter: ExactSizeIterator,
|
I::IntoIter: ExactSizeIterator,
|
||||||
{
|
{
|
||||||
let param_types = statement.params();
|
let param_types = statement.params();
|
||||||
let (param_formats, params): (Vec<_>, Vec<_>) = params
|
|
||||||
.into_iter()
|
|
||||||
.zip(param_types.iter())
|
|
||||||
.map(|(p, ty)| (p.borrow_to_sql().encode_format(ty) as i16, p))
|
|
||||||
.unzip();
|
|
||||||
let params = params.into_iter();
|
let params = params.into_iter();
|
||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
@ -171,6 +166,13 @@ where
|
|||||||
params.len()
|
params.len()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let (param_formats, params): (Vec<_>, Vec<_>) = params
|
||||||
|
.zip(param_types.iter())
|
||||||
|
.map(|(p, ty)| (p.borrow_to_sql().encode_format(ty) as i16, p))
|
||||||
|
.unzip();
|
||||||
|
|
||||||
|
let params = params.into_iter();
|
||||||
|
|
||||||
let mut error_idx = 0;
|
let mut error_idx = 0;
|
||||||
let r = frontend::bind(
|
let r = frontend::bind(
|
||||||
portal,
|
portal,
|
||||||
|
Loading…
Reference in New Issue
Block a user