mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Use bail macro
This seems to be our standard way to do this.
This commit is contained in:
committed by
link2xt
parent
47a6e31047
commit
4508eced37
@@ -1,6 +1,6 @@
|
||||
//! Contacts module
|
||||
|
||||
use anyhow::{bail, ensure, format_err, Context as _, Error, Result};
|
||||
use anyhow::{bail, ensure, format_err, Context as _, Result};
|
||||
use async_std::path::PathBuf;
|
||||
use deltachat_derive::{FromSql, ToSql};
|
||||
use itertools::Itertools;
|
||||
@@ -294,7 +294,7 @@ impl Contact {
|
||||
min_origin: Origin,
|
||||
) -> Result<Option<u32>> {
|
||||
if addr.as_ref().is_empty() {
|
||||
return Err(Error::msg("lookup_id_by_addr: empty address"));
|
||||
bail!("lookup_id_by_addr: empty address");
|
||||
}
|
||||
|
||||
let addr_normalized = addr_normalize(addr.as_ref());
|
||||
|
||||
Reference in New Issue
Block a user