Merge pull request #170 from jgallagher/rust-1.9-reexported-trait-bugfix

Remove workaround for Rust compiler bug that was fixed in 1.9.
This commit is contained in:
John Gallagher 2016-05-30 10:02:45 -04:00
commit 5941be0456
2 changed files with 2 additions and 8 deletions

View File

@ -886,10 +886,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()));