diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index e23320f827..ae80e59f22 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -88,8 +88,9 @@ impl View for CollabTitlebarItem { right_container.add_child(self.render_leave_call(&theme, cx)); let muted = room.read(cx).is_muted(); let speaking = room.read(cx).is_speaking(); - left_container - .add_child(self.render_current_user(&workspace, &theme, &user, peer_id, muted, speaking, cx)); + left_container.add_child( + self.render_current_user(&workspace, &theme, &user, peer_id, muted, speaking, cx), + ); left_container.add_children(self.render_collaborators(&workspace, &theme, &room, cx)); right_container.add_child(self.render_toggle_mute(&theme, &room, cx)); right_container.add_child(self.render_toggle_deafen(&theme, &room, cx)); diff --git a/crates/live_kit_client/examples/test_app.rs b/crates/live_kit_client/examples/test_app.rs index 4fc02d9a9d..f5f6d0e46f 100644 --- a/crates/live_kit_client/examples/test_app.rs +++ b/crates/live_kit_client/examples/test_app.rs @@ -110,10 +110,7 @@ fn main() { // Clear out any active speakers changed messages let mut next = audio_track_updates.next().await.unwrap(); - while let RemoteAudioTrackUpdate::ActiveSpeakersChanged { - speakers - } = next - { + while let RemoteAudioTrackUpdate::ActiveSpeakersChanged { speakers } = next { println!("Speakers changed: {:?}", speakers); next = audio_track_updates.next().await.unwrap(); } diff --git a/crates/live_kit_client/src/prod.rs b/crates/live_kit_client/src/prod.rs index bdbba87b51..6daa0601ca 100644 --- a/crates/live_kit_client/src/prod.rs +++ b/crates/live_kit_client/src/prod.rs @@ -402,10 +402,14 @@ impl Room { // A vec of publisher IDs fn active_speakers_changed(&self, speakers: Vec) { - self.remote_audio_track_subscribers.lock().retain(move |tx| { - tx.unbounded_send(RemoteAudioTrackUpdate::ActiveSpeakersChanged { speakers: speakers.clone() }) + self.remote_audio_track_subscribers + .lock() + .retain(move |tx| { + tx.unbounded_send(RemoteAudioTrackUpdate::ActiveSpeakersChanged { + speakers: speakers.clone(), + }) .is_ok() - }); + }); } fn did_subscribe_to_remote_video_track(&self, track: RemoteVideoTrack) { @@ -544,7 +548,11 @@ impl RoomDelegate { let speakers = unsafe { CFArray::wrap_under_get_rule(participants) .into_iter() - .map(|speaker: core_foundation::base::ItemRef<'_, *const c_void>| CFString::wrap_under_get_rule(*speaker as CFStringRef).to_string()) + .map( + |speaker: core_foundation::base::ItemRef<'_, *const c_void>| { + CFString::wrap_under_get_rule(*speaker as CFStringRef).to_string() + }, + ) .collect() }; diff --git a/crates/live_kit_client/src/test.rs b/crates/live_kit_client/src/test.rs index 809a1f5d29..3fc046c5a2 100644 --- a/crates/live_kit_client/src/test.rs +++ b/crates/live_kit_client/src/test.rs @@ -581,7 +581,7 @@ pub enum RemoteVideoTrackUpdate { #[derive(Clone)] pub enum RemoteAudioTrackUpdate { ActiveSpeakersChanged { speakers: Vec }, - MuteChanged { track_id: Sid, muted: bool}, + MuteChanged { track_id: Sid, muted: bool }, Subscribed(Arc), Unsubscribed { publisher_id: Sid, track_id: Sid }, }