Fix compilation error and remaining test.

Ref. for compilation error:
https://github.com/rust-lang/rust/issues/64552
master
Denis Kasak 2020-06-20 12:51:02 +02:00
parent 5bd3c49afc
commit 733689870e
2 changed files with 8 additions and 6 deletions

View File

@ -1284,11 +1284,13 @@ impl BaseClient {
match &mut *olm { match &mut *olm {
Some(o) => { Some(o) => {
let room = room.write().await; let room = room.write().await;
let members = room
.joined_members // XXX: We construct members in a slightly roundabout way instead of chaining the
.keys() // iterators directly because of https://github.com/rust-lang/rust/issues/64552
.chain(room.invited_members.keys()); let joined_members = room.joined_members.keys();
Ok(o.share_group_session(room_id, members).await?) let invited_members = room.joined_members.keys();
let members: Vec<&UserId> = joined_members.chain(invited_members).collect();
Ok(o.share_group_session(room_id, members.into_iter()).await?)
} }
None => panic!("Olm machine wasn't started"), None => panic!("Olm machine wasn't started"),
} }

View File

@ -93,7 +93,7 @@ pub enum CustomOrRawEvent<'c> {
/// { /// {
/// let name = { /// let name = {
/// let room = room.read().await; /// let room = room.read().await;
/// let member = room.members.get(&sender).unwrap(); /// let member = room.joined_members.get(&sender).unwrap();
/// member /// member
/// .display_name /// .display_name
/// .as_ref() /// .as_ref()