fix for rusqlite Result api
This commit is contained in:
parent
f4002f34f4
commit
76ae972e2e
2 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ impl SyncMetadata {
|
||||||
tx.query_row(
|
tx.query_row(
|
||||||
"SELECT value FROM tolstoy_metadata WHERE key = ?",
|
"SELECT value FROM tolstoy_metadata WHERE key = ?",
|
||||||
&[&schema::REMOTE_HEAD_KEY], |r| {
|
&[&schema::REMOTE_HEAD_KEY], |r| {
|
||||||
let bytes: Vec<u8> = r.get(0);
|
let bytes: Vec<u8> = r.get(0).unwrap();
|
||||||
Uuid::from_bytes(bytes.as_slice())
|
Uuid::from_bytes(bytes.as_slice())
|
||||||
}
|
}
|
||||||
)?.map_err(|e| e.into())
|
)?.map_err(|e| e.into())
|
||||||
|
|
|
@ -83,7 +83,7 @@ impl TxMapper {
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let results = stmt.query_and_then(&[&tx], |r| -> Result<Uuid>{
|
let results = stmt.query_and_then(&[&tx], |r| -> Result<Uuid>{
|
||||||
let bytes: Vec<u8> = r.get(0);
|
let bytes: Vec<u8> = r.get(0).unwrap();
|
||||||
Uuid::from_bytes(bytes.as_slice()).map_err(|e| e.into())
|
Uuid::from_bytes(bytes.as_slice()).map_err(|e| e.into())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue