Remove workaround for Rust compiler bug that was fixed in 1.9.

This commit is contained in:
John Gallagher 2016-05-29 20:38:46 -04:00
parent f1089176f1
commit b1b438158d
2 changed files with 2 additions and 8 deletions

View File

@ -881,10 +881,7 @@ impl<'conn> Statement<'conn> {
for (i, p) in params.iter().enumerate() {
try!(unsafe {
self.conn.decode_result(
// This should be
// `p.bind_parameter(self.stmt.ptr(), (i + 1) as c_int)`
// but that doesn't compile until Rust 1.9 due to a compiler bug.
ToSql::bind_parameter(*p, self.stmt.ptr(), (i + 1) as c_int)
p.bind_parameter(self.stmt.ptr(), (i + 1) as c_int)
)
});
}

View File

@ -205,10 +205,7 @@ impl<'conn> Statement<'conn> {
for &(name, value) in params {
if let Some(i) = try!(self.parameter_index(name)) {
try!(self.conn.decode_result(unsafe {
// This should be
// `value.bind_parameter(self.stmt.ptr(), i)`
// but that doesn't compile until Rust 1.9 due to a compiler bug.
ToSql::bind_parameter(value, self.stmt.ptr(), i)
value.bind_parameter(self.stmt.ptr(), i)
}));
} else {
return Err(Error::InvalidParameterName(name.into()));