diff --git a/crates/call2/src/call2.rs b/crates/call2/src/call2.rs index 534964b3c2..9a89ec7167 100644 --- a/crates/call2/src/call2.rs +++ b/crates/call2/src/call2.rs @@ -3,7 +3,7 @@ pub mod participant; pub mod room; mod shared_screen; -use anyhow::{anyhow, bail, Result}; +use anyhow::{anyhow, Result}; use async_trait::async_trait; use audio::Audio; use call_settings::CallSettings; @@ -14,8 +14,8 @@ use client::{ use collections::HashSet; use futures::{channel::oneshot, future::Shared, Future, FutureExt}; use gpui::{ - AppContext, AsyncAppContext, AsyncWindowContext, Context, EventEmitter, Model, ModelContext, - Subscription, Task, View, ViewContext, VisualContext, WeakModel, WeakView, + AppContext, AsyncAppContext, Context, EventEmitter, Model, ModelContext, Subscription, Task, + View, ViewContext, VisualContext, WeakModel, WeakView, }; pub use participant::ParticipantLocation; use postage::watch; @@ -609,7 +609,7 @@ impl CallHandler for Call { fn room_id(&self, cx: &AppContext) -> Option { Some(self.active_call.as_ref()?.0.read(cx).room()?.read(cx).id()) } - fn hang_up(&self, mut cx: &mut AppContext) -> Task> { + fn hang_up(&self, cx: &mut AppContext) -> Task> { let Some((call, _)) = self.active_call.as_ref() else { return Task::ready(Err(anyhow!("Cannot exit a call; not in a call"))); }; diff --git a/crates/collab_ui2/src/collab_titlebar_item.rs b/crates/collab_ui2/src/collab_titlebar_item.rs index bfa2932aee..b5ed8b0919 100644 --- a/crates/collab_ui2/src/collab_titlebar_item.rs +++ b/crates/collab_ui2/src/collab_titlebar_item.rs @@ -233,9 +233,11 @@ impl Render for CollabTitlebarItem { .child(IconButton::new("leave-call", ui::Icon::Exit).on_click({ let workspace = workspace.clone(); move |_, cx| { - workspace.update(cx, |this, cx| { - this.call_state().hang_up(cx).detach(); - }); + workspace + .update(cx, |this, cx| { + this.call_state().hang_up(cx).detach(); + }) + .log_err(); } })), ) diff --git a/crates/collab_ui2/src/face_pile.rs b/crates/collab_ui2/src/face_pile.rs index 61a2ef85b5..e235f33ce6 100644 --- a/crates/collab_ui2/src/face_pile.rs +++ b/crates/collab_ui2/src/face_pile.rs @@ -1,8 +1,6 @@ use gpui::{ - div, AnyElement, Div, IntoElement as _, ParentElement as _, Render, RenderOnce, Styled, - ViewContext, WindowContext, + div, AnyElement, Div, IntoElement as _, ParentElement as _, RenderOnce, Styled, WindowContext, }; -use ui::Avatar; #[derive(Default)] pub(crate) struct FacePile {