mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 09:09:19 +08:00
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:
commit
5941be0456
@ -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)
|
||||
)
|
||||
});
|
||||
}
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user