Fix order of parameters in InvalidParameterCount message

This prints a message like `Error: Wrong number of parameters passed to query. Got 7, needed 8`, but the numbers were the wrong way around - i.e. it should have printed `Got 8, needed 7` in this case.
This commit is contained in:
Tim 2020-07-01 13:16:15 +01:00 committed by Thom Chiovoloni
parent f79a9ca3ef
commit 83c038107d

View File

@ -454,7 +454,7 @@ impl Statement<'_> {
self.bind_parameter(&p, index)?;
}
if index != expected {
Err(Error::InvalidParameterCount(expected, index))
Err(Error::InvalidParameterCount(index, expected))
} else {
Ok(())
}