Take IntoIterator rather than &[&ToSql] (#312)

This commit is contained in:
gwenn
2018-09-16 09:49:23 +02:00
parent bd1756adef
commit c4ae541eac
18 changed files with 341 additions and 235 deletions

View File

@@ -32,6 +32,7 @@ impl FromSql for time::Timespec {
#[cfg(test)]
mod test {
use super::time;
use types::ToSql;
use Connection;
fn checked_memory_handle() -> Connection {
@@ -58,10 +59,10 @@ mod test {
db.execute("INSERT INTO foo(t) VALUES (?)", &[&ts]).unwrap();
let from: time::Timespec = db
.query_row("SELECT t FROM foo", &[], |r| r.get(0))
.query_row("SELECT t FROM foo", &[] as &[&ToSql], |r| r.get(0))
.unwrap();
db.execute("DELETE FROM foo", &[]).unwrap();
db.execute("DELETE FROM foo", &[] as &[&ToSql]).unwrap();
assert_eq!(from, ts);
}