Remove silent unwrap in data providers

This commit is contained in:
2026-08-19 23:37:59 +03:00
parent 01f0999772
commit de2dbaf6c1
6 changed files with 47 additions and 64 deletions
+2 -9
View File
@@ -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();
}