Bring back the check that the contact's addr is no self addr in get_all()

Create params_iter() and params_iterv![] helper functions
This commit is contained in:
Hocuri
2022-04-19 14:52:14 +02:00
committed by holger krekel
parent 684351c753
commit df5eb546e7
2 changed files with 35 additions and 11 deletions

View File

@@ -34,6 +34,17 @@ macro_rules! paramsv {
};
}
#[macro_export]
macro_rules! params_iterv {
($($param:expr),+ $(,)?) => {
vec![$(&$param as &dyn $crate::ToSql),+]
};
}
pub(crate) fn params_iter(iter: &[impl crate::ToSql]) -> impl Iterator<Item = &dyn crate::ToSql> {
iter.iter().map(|item| item as &dyn crate::ToSql)
}
mod migrations;
/// A wrapper around the underlying Sqlite3 object.