Skip to content

Commit

Permalink
Remove hack for rusqlite optional()
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Jun 30, 2020
1 parent 6ce77ea commit ffaebeb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions database/src/pool/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,8 @@ impl Connection for SqliteConnection {
cid.and_then(|cid| {
query
.query_row(params![&sid, &cid.0], |row| row.get(0))
.optional()
.unwrap_or_else(|e| {
// work around https://github.com/rusqlite/rusqlite/issues/777
if let rusqlite::Error::InvalidColumnType(_, _, rusqlite::types::Type::Null) = e {
None
} else {
panic!("{:?}: series={:?}, aid={:?}", e, sid, cid);
}
panic!("{:?}: series={:?}, aid={:?}", e, sid, cid);
})
})
})
Expand Down

0 comments on commit ffaebeb

Please sign in to comment.