Turn dc_ensure_secret_key_existy into something more rusty

This marks the function safe and returns Result, it also now returns
the ConfiguredAddr since it has to look this up anyway and it makes
testing more easy.  Turns out it reduces some duplicate SQL query in
some callers too.

More test code has been moved from dc_imex to test_utils as it's
more genrally applicable.
This commit is contained in:
Floris Bruynooghe
2019-08-03 23:39:10 +02:00
committed by Floris Bruynooghe
parent ff39fa0fed
commit f31f603c8b
9 changed files with 199 additions and 174 deletions

View File

@@ -1453,9 +1453,9 @@ pub trait StrExt {
///
/// This allocates a new raw C string which must be freed using
/// `free`. It takes care of some common pitfalls with using
/// [CString::as_ptr].
/// [CString.as_ptr].
///
/// [CString::as_ptr]: std::ffi::CString::as_ptr
/// [CString.as_ptr]: std::ffi::CString.as_ptr
///
/// # Panics
///