fix compile errors in tests
This commit is contained in:
parent
2b97a90b64
commit
e6a2af3553
1 changed files with 8 additions and 8 deletions
|
@ -27,7 +27,7 @@ fn can_import_sqlite() {
|
||||||
name TEXT NOT NULL,
|
name TEXT NOT NULL,
|
||||||
data BLOB
|
data BLOB
|
||||||
)",
|
)",
|
||||||
&[])
|
rusqlite::params![])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let me = Person {
|
let me = Person {
|
||||||
id: 1,
|
id: 1,
|
||||||
|
@ -36,16 +36,16 @@ fn can_import_sqlite() {
|
||||||
};
|
};
|
||||||
conn.execute("INSERT INTO person (name, data)
|
conn.execute("INSERT INTO person (name, data)
|
||||||
VALUES (?1, ?2)",
|
VALUES (?1, ?2)",
|
||||||
&[&me.name, &me.data])
|
rusqlite::params![&me.name, &me.data])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut stmt = conn.prepare("SELECT id, name, data FROM person").unwrap();
|
let mut stmt = conn.prepare("SELECT id, name, data FROM person").unwrap();
|
||||||
let person_iter = stmt.query_map(&[], |row| {
|
let person_iter = stmt.query_map(rusqlite::params![], |row| {
|
||||||
Person {
|
Ok(Person {
|
||||||
id: row.get(0),
|
id: row.get(0).unwrap(),
|
||||||
name: row.get(1),
|
name: row.get(1).unwrap(),
|
||||||
data: row.get(2),
|
data: row.get(2).unwrap(),
|
||||||
}
|
})
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue