diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index 22e59ac4671d8a8032c6e0a1b166ea1fb7be860e..77f22ea2ca1e14cc659955adb3651d8746aed450 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -150,12 +150,13 @@ impl Room { let connect = room.connect(&connection_info.server_url, &connection_info.token); cx.spawn(|this, mut cx| async move { - connect.await?; - this.update(&mut cx, |this, cx| this.share_microphone(cx)).await?; + connect.await?; + this.update(&mut cx, |this, cx| this.share_microphone(cx)) + .await?; - anyhow::Ok(()) - }) - .detach_and_log_err(cx); + anyhow::Ok(()) + }) + .detach_and_log_err(cx); Some(LiveKitRoom { room, @@ -232,9 +233,7 @@ impl Room { }) .await { - Ok(()) => { - Ok(room) - } + Ok(()) => Ok(room), Err(error) => Err(anyhow!("room creation failed: {:?}", error)), } }) diff --git a/crates/collab_ui/src/collab_ui.rs b/crates/collab_ui/src/collab_ui.rs index e9c2bcf7f91595e93c2de4d5edeb2546a2494714..38a39762f4c4e34317d1c78ad041b9d988cef75d 100644 --- a/crates/collab_ui/src/collab_ui.rs +++ b/crates/collab_ui/src/collab_ui.rs @@ -16,7 +16,15 @@ use std::sync::Arc; use util::ResultExt; use workspace::AppState; -actions!(collab, [ToggleScreenSharing, ToggleMute, ToggleDeafen, ShareMicrophone]); +actions!( + collab, + [ + ToggleScreenSharing, + ToggleMute, + ToggleDeafen, + ShareMicrophone + ] +); pub fn init(app_state: &Arc, cx: &mut AppContext) { collab_titlebar_item::init(cx); @@ -64,6 +72,7 @@ pub fn toggle_deafen(_: &ToggleDeafen, cx: &mut AppContext) { pub fn share_microphone(_: &ShareMicrophone, cx: &mut AppContext) { if let Some(room) = ActiveCall::global(cx).read(cx).room().cloned() { - room.update(cx, Room::share_microphone).detach_and_log_err(cx) + room.update(cx, Room::share_microphone) + .detach_and_log_err(cx) } }