mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 07:56: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:
@@ -4,6 +4,7 @@
|
||||
//!
|
||||
//! Tokens are used in countermitm verification protocols.
|
||||
|
||||
use anyhow::Result;
|
||||
use deltachat_derive::{FromSql, ToSql};
|
||||
|
||||
use crate::chat::ChatId;
|
||||
@@ -58,7 +59,7 @@ pub async fn lookup(
|
||||
context: &Context,
|
||||
namespace: Namespace,
|
||||
chat: Option<ChatId>,
|
||||
) -> crate::sql::Result<Option<String>> {
|
||||
) -> Result<Option<String>> {
|
||||
let token = match chat {
|
||||
Some(chat_id) => {
|
||||
context
|
||||
|
||||
Reference in New Issue
Block a user