Format let-else statements
This commit is contained in:
parent
732af201dc
commit
404f76739c
28 changed files with 210 additions and 109 deletions
|
@ -272,8 +272,12 @@ impl FollowableItem for ChannelView {
|
|||
state: &mut Option<proto::view::Variant>,
|
||||
cx: &mut AppContext,
|
||||
) -> Option<gpui::Task<anyhow::Result<ViewHandle<Self>>>> {
|
||||
let Some(proto::view::Variant::ChannelView(_)) = state else { return None };
|
||||
let Some(proto::view::Variant::ChannelView(state)) = state.take() else { unreachable!() };
|
||||
let Some(proto::view::Variant::ChannelView(_)) = state else {
|
||||
return None;
|
||||
};
|
||||
let Some(proto::view::Variant::ChannelView(state)) = state.take() else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
let open = ChannelView::open(state.channel_id, pane, workspace, cx);
|
||||
|
||||
|
|
|
@ -152,12 +152,9 @@ impl View for ChannelModal {
|
|||
let theme = &theme::current(cx).collab_panel.tabbed_modal;
|
||||
|
||||
let mode = self.picker.read(cx).delegate().mode;
|
||||
let Some(channel) = self
|
||||
.channel_store
|
||||
.read(cx)
|
||||
.channel_for_id(self.channel_id) else {
|
||||
return Empty::new().into_any()
|
||||
};
|
||||
let Some(channel) = self.channel_store.read(cx).channel_for_id(self.channel_id) else {
|
||||
return Empty::new().into_any();
|
||||
};
|
||||
|
||||
enum InviteMembers {}
|
||||
enum ManageMembers {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue