Remove silent unwrap in data providers
This commit is contained in:
@@ -69,10 +69,7 @@ pub fn update_stat_score(stat: &CardStatistics, connection: &Connection) {
|
||||
"UPDATE card_stats SET score = ?1, last_opened = ?2 WHERE id = ?3",
|
||||
(&stat.score, &stat.last_open.timestamp(), &stat.id),
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
println!("{}", e);
|
||||
0
|
||||
});
|
||||
.unwrap();
|
||||
println!("Updated stat: {}", time.elapsed().as_millis());
|
||||
}
|
||||
|
||||
@@ -81,9 +78,5 @@ pub fn delete_stat(stat: &CardStatistics, connection: &Connection) {
|
||||
return;
|
||||
}
|
||||
connection
|
||||
.execute("DELETE FROM card_stats WHERE id = ?1", (&stat.id,))
|
||||
.unwrap_or_else(|e| {
|
||||
println!("{}", e);
|
||||
0
|
||||
});
|
||||
.execute("DELETE FROM card_stats WHERE id = ?1", (&stat.id,)).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user