From dbd95e35cfa21f5e01b881eedd2251720aea20f2 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 20 Jun 2023 12:36:36 -0700 Subject: [PATCH] fmt --- crates/collab_ui/src/collab_ui.rs | 10 +++++++--- crates/gpui/src/executor.rs | 3 ++- crates/live_kit_client/src/prod.rs | 15 ++++++--------- crates/live_kit_client/src/test.rs | 6 ++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/collab_ui/src/collab_ui.rs b/crates/collab_ui/src/collab_ui.rs index 940700a526..36ee58242a 100644 --- a/crates/collab_ui/src/collab_ui.rs +++ b/crates/collab_ui/src/collab_ui.rs @@ -12,8 +12,8 @@ mod sharing_status_indicator; use call::{ActiveCall, Room}; pub use collab_titlebar_item::{CollabTitlebarItem, ToggleContactsMenu}; use gpui::{actions, AppContext, Task}; -use util::ResultExt; use std::sync::Arc; +use util::ResultExt; use workspace::AppState; actions!(collab, [ToggleScreenSharing, ToggleMute, ToggleDeafen]); @@ -47,12 +47,16 @@ pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) { pub fn toggle_mute(_: &ToggleMute, cx: &mut AppContext) { if let Some(room) = ActiveCall::global(cx).read(cx).room().cloned() { - room.update(cx, Room::toggle_mute).map(|task| task.detach_and_log_err(cx)).log_err(); + room.update(cx, Room::toggle_mute) + .map(|task| task.detach_and_log_err(cx)) + .log_err(); } } pub fn toggle_deafen(_: &ToggleDeafen, cx: &mut AppContext) { if let Some(room) = ActiveCall::global(cx).read(cx).room().cloned() { - room.update(cx, Room::toggle_deafen).map(|task| task.detach_and_log_err(cx)).log_err(); + room.update(cx, Room::toggle_deafen) + .map(|task| task.detach_and_log_err(cx)) + .log_err(); } } diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 0923826a09..fb175d9d5d 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -7,12 +7,13 @@ use std::{ fmt::{self, Display}, marker::PhantomData, mem, + panic::Location, pin::Pin, rc::Rc, sync::Arc, task::{Context, Poll}, thread, - time::Duration, panic::Location, + time::Duration, }; use crate::{ diff --git a/crates/live_kit_client/src/prod.rs b/crates/live_kit_client/src/prod.rs index 76f06b562f..ed040fd5cc 100644 --- a/crates/live_kit_client/src/prod.rs +++ b/crates/live_kit_client/src/prod.rs @@ -326,7 +326,10 @@ impl Room { } } - pub fn remote_audio_track_publications(&self, participant_id: &str) -> Vec> { + pub fn remote_audio_track_publications( + &self, + participant_id: &str, + ) -> Vec> { unsafe { let tracks = LKRoomAudioTrackPublicationsForRemoteParticipant( self.native_room, @@ -348,7 +351,6 @@ impl Room { } } - pub fn remote_audio_track_updates(&self) -> mpsc::UnboundedReceiver { let (tx, rx) = mpsc::unbounded(); self.remote_audio_track_subscribers.lock().push(tx); @@ -629,7 +631,6 @@ impl Drop for RemoteTrackPublication { } } - #[derive(Debug)] pub struct RemoteAudioTrack { _native_track: *const c_void, @@ -658,15 +659,11 @@ impl RemoteAudioTrack { } pub fn enable(&self) -> impl Future> { - async { - Ok(()) - } + async { Ok(()) } } pub fn disable(&self) -> impl Future> { - async { - Ok(()) - } + async { Ok(()) } } } diff --git a/crates/live_kit_client/src/test.rs b/crates/live_kit_client/src/test.rs index e8c5247f53..9db57a3294 100644 --- a/crates/live_kit_client/src/test.rs +++ b/crates/live_kit_client/src/test.rs @@ -423,9 +423,7 @@ impl Room { .unwrap() .into_iter() .filter(|track| track.publisher_id() == publisher_id) - .map(|_track| { - Arc::new(RemoteTrackPublication {}) - }) + .map(|_track| Arc::new(RemoteTrackPublication {})) .collect() } @@ -495,7 +493,7 @@ impl Drop for Room { pub struct LocalTrackPublication; impl LocalTrackPublication { - pub fn set_mute(&self, _mute: bool) -> impl Future> { + pub fn set_mute(&self, _mute: bool) -> impl Future> { async { Ok(()) } } }