diff options
Diffstat (limited to 'bin/domain/imag-contact/src/util.rs')
-rw-r--r-- | bin/domain/imag-contact/src/util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/domain/imag-contact/src/util.rs b/bin/domain/imag-contact/src/util.rs index c3d2c1fb..2125753c 100644 --- a/bin/domain/imag-contact/src/util.rs +++ b/bin/domain/imag-contact/src/util.rs @@ -19,8 +19,8 @@ use std::collections::BTreeMap; -use failure::Fallible as Result; -use failure::err_msg; +use anyhow::Result; + use resiter::IterInnerOkOrElse; use resiter::AndThen; @@ -91,12 +91,12 @@ pub fn find_contact_by_hash<'a, H: AsRef<str>>(rt: &'a Runtime, hash: H) Ok(rt.store() .all_contacts()? .into_get_iter() - .map_inner_ok_or_else(|| err_msg("Did not find one entry")) + .map_inner_ok_or_else(|| anyhow!("Did not find one entry")) .and_then_ok(move |entry| { let deser = entry.deser()?; let id_starts_with_hash = deser.uid() - .ok_or_else(|| err_msg("Could not get StoreId from Store::all_contacts(). This is a BUG!"))? + .ok_or_else(|| anyhow!("Could not get StoreId from Store::all_contacts(). This is a BUG!"))? .starts_with(hash.as_ref()); if id_starts_with_hash { |