From ea49a35b436a553d57316c661796294cf410eeaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 20 Aug 2020 10:25:05 +0200 Subject: [PATCH] crypto: Simplify the function signature of share_group_session. --- matrix_sdk_crypto/src/machine.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index ea06e097..3ee383f7 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -761,7 +761,7 @@ impl OlmMachine { trace!("Successfully decrypted a Olm message: {}", plaintext); - Ok(self.parse_decrypted_to_device_event(sender, &plaintext)?) + self.parse_decrypted_to_device_event(sender, &plaintext) } /// Parse a decrypted Olm message, check that the plaintext and encrypted @@ -1040,15 +1040,12 @@ impl OlmMachine { /// used. /// /// `users` - The list of users that should receive the group session. - pub async fn share_group_session( + pub async fn share_group_session( &self, room_id: &RoomId, users: impl Iterator, - encryption_settings: S, - ) -> OlmResult> - where - S: Into + Sized, - { + encryption_settings: impl Into, + ) -> OlmResult> { self.create_outbound_group_session(room_id, encryption_settings.into()) .await?; let session = self.outbound_group_sessions.get(room_id).unwrap();