Reset in Rows's drop impl instead of waiting for the next query

This commit is contained in:
John Gallagher
2016-05-16 14:02:39 -05:00
parent 3a52dd65f0
commit 4a6c7b5329
4 changed files with 12 additions and 24 deletions

View File

@@ -113,10 +113,7 @@ impl<'conn> Statement<'conn> {
///
/// Will return `Err` if binding parameters fails.
pub fn query_named<'a>(&'a mut self, params: &[(&str, &ToSql)]) -> Result<Rows<'a>> {
self.reset_if_needed();
try!(self.bind_parameters_named(params));
self.needs_reset = true;
Ok(Rows::new(self))
}