mirror of
https://github.com/isar/rusqlite.git
synced 2025-02-22 07:48:14 +08:00
Remove workaround for Rust compiler bug that was fixed in 1.9.
This commit is contained in:
parent
f1089176f1
commit
b1b438158d
@ -881,10 +881,7 @@ impl<'conn> Statement<'conn> {
|
|||||||
for (i, p) in params.iter().enumerate() {
|
for (i, p) in params.iter().enumerate() {
|
||||||
try!(unsafe {
|
try!(unsafe {
|
||||||
self.conn.decode_result(
|
self.conn.decode_result(
|
||||||
// This should be
|
p.bind_parameter(self.stmt.ptr(), (i + 1) as c_int)
|
||||||
// `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)
|
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -205,10 +205,7 @@ impl<'conn> Statement<'conn> {
|
|||||||
for &(name, value) in params {
|
for &(name, value) in params {
|
||||||
if let Some(i) = try!(self.parameter_index(name)) {
|
if let Some(i) = try!(self.parameter_index(name)) {
|
||||||
try!(self.conn.decode_result(unsafe {
|
try!(self.conn.decode_result(unsafe {
|
||||||
// This should be
|
value.bind_parameter(self.stmt.ptr(), i)
|
||||||
// `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)
|
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::InvalidParameterName(name.into()));
|
return Err(Error::InvalidParameterName(name.into()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user