mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 07:26:29 +03:00
Simplify SQL error handling (#2415)
* Remove sql::error submodule Use anyhow errors instead. * Remove explicit checks for open SQL connection An error will be thrown anyway during attempt to execute query. * Don't use `with_conn()` and remove it * Remove unused `with_conn_async` * Resultify markseen_msgs
This commit is contained in:
@@ -421,7 +421,7 @@ impl Peerstate {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn save_to_db(&self, sql: &Sql, create: bool) -> crate::sql::Result<()> {
|
||||
pub async fn save_to_db(&self, sql: &Sql, create: bool) -> Result<()> {
|
||||
if self.to_save == Some(ToSave::All) || create {
|
||||
sql.execute(
|
||||
if create {
|
||||
|
||||
Reference in New Issue
Block a user