cargo fmt

This commit is contained in:
Piotr Osiewicz
2023-06-22 13:49:36 +02:00
parent 76366422a6
commit 4583d22ede
2 changed files with 18 additions and 10 deletions
+7 -8
View File
@@ -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)),
}
})
+11 -2
View File
@@ -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<AppState>, 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)
}
}