From 83c038107de027f51e23c615618dd76620288294 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 1 Jul 2020 13:16:15 +0100 Subject: [PATCH] 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. --- src/statement.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statement.rs b/src/statement.rs index 7657095..648a9b7 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -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(()) }