summaryrefslogtreecommitdiffstats
path: root/src/review/diff.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/review/diff.rs')
-rw-r--r--src/review/diff.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/review/diff.rs b/src/review/diff.rs
index 5af6f5a..1196406 100644
--- a/src/review/diff.rs
+++ b/src/review/diff.rs
@@ -72,18 +72,7 @@ fn recipe_of(db: &Db, snapshot_id: Option<i64>) -> Option<Recipe> {
}
fn candidate_snapshot_id(db: &Db, candidate_id: i64) -> Option<i64> {
- db.read(|c| {
- use rusqlite::OptionalExtension;
- c.query_row(
- "SELECT snapshot_id FROM candidate WHERE id=?1",
- rusqlite::params![candidate_id],
- |r| r.get::<_, i64>(0),
- )
- .optional()
- .map_err(Into::into)
- })
- .ok()
- .flatten()
+ db::candidate_snapshot_id(db, candidate_id).ok().flatten()
}
/// `source=()` entries added, removed, or moved to a different host (ยง6). A new