crypto: Simplify some more function definitions.

master
Damir Jelić 2020-08-20 10:36:58 +02:00
parent ea49a35b43
commit c3eb4d8106
1 changed files with 3 additions and 6 deletions

View File

@ -192,10 +192,10 @@ impl OlmMachine {
#[cfg(feature = "sqlite_cryptostore")] #[cfg(feature = "sqlite_cryptostore")]
#[instrument(skip(path, passphrase))] #[instrument(skip(path, passphrase))]
#[cfg_attr(feature = "docs", doc(cfg(r#sqlite_cryptostore)))] #[cfg_attr(feature = "docs", doc(cfg(r#sqlite_cryptostore)))]
pub async fn new_with_default_store<P: AsRef<Path>>( pub async fn new_with_default_store(
user_id: &UserId, user_id: &UserId,
device_id: &DeviceId, device_id: &DeviceId,
path: P, path: impl AsRef<Path>,
passphrase: &str, passphrase: &str,
) -> StoreResult<Self> { ) -> StoreResult<Self> {
let store = let store =
@ -1316,10 +1316,7 @@ impl OlmMachine {
/// ///
/// If the user is already known to the Olm machine it will not be /// If the user is already known to the Olm machine it will not be
/// considered for a key query. /// considered for a key query.
pub async fn update_tracked_users<'a, I>(&self, users: I) pub async fn update_tracked_users(&self, users: impl IntoIterator<Item = &UserId>) {
where
I: IntoIterator<Item = &'a UserId>,
{
for user in users { for user in users {
if self.store.is_user_tracked(user) { if self.store.is_user_tracked(user) {
continue; continue;