Fix clippy::manual_map
lint violations (#36584)
#36577 Release Notes: - N/A
This commit is contained in:
parent
de12633591
commit
bc79076ad3
18 changed files with 62 additions and 118 deletions
|
@ -4012,12 +4012,9 @@ impl Render for AcpThreadView {
|
|||
.children(
|
||||
if let Some(usage_callout) = self.render_usage_callout(line_height, cx) {
|
||||
Some(usage_callout.into_any_element())
|
||||
} else if let Some(token_limit_callout) =
|
||||
self.render_token_limit_callout(line_height, cx)
|
||||
{
|
||||
Some(token_limit_callout.into_any_element())
|
||||
} else {
|
||||
None
|
||||
self.render_token_limit_callout(line_height, cx)
|
||||
.map(|token_limit_callout| token_limit_callout.into_any_element())
|
||||
},
|
||||
)
|
||||
.child(self.render_message_editor(window, cx))
|
||||
|
|
|
@ -779,13 +779,11 @@ impl ActiveThread {
|
|||
|
||||
let list_state = ListState::new(0, ListAlignment::Bottom, px(2048.));
|
||||
|
||||
let workspace_subscription = if let Some(workspace) = workspace.upgrade() {
|
||||
Some(cx.observe_release(&workspace, |this, _, cx| {
|
||||
let workspace_subscription = workspace.upgrade().map(|workspace| {
|
||||
cx.observe_release(&workspace, |this, _, cx| {
|
||||
this.dismiss_notifications(cx);
|
||||
}))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
})
|
||||
});
|
||||
|
||||
let mut this = Self {
|
||||
language_registry,
|
||||
|
|
|
@ -1532,13 +1532,11 @@ impl InlineAssistant {
|
|||
.and_then(|item| item.act_as::<Editor>(cx))
|
||||
{
|
||||
Some(InlineAssistTarget::Editor(workspace_editor))
|
||||
} else if let Some(terminal_view) = workspace
|
||||
.active_item(cx)
|
||||
.and_then(|item| item.act_as::<TerminalView>(cx))
|
||||
{
|
||||
Some(InlineAssistTarget::Terminal(terminal_view))
|
||||
} else {
|
||||
None
|
||||
workspace
|
||||
.active_item(cx)
|
||||
.and_then(|item| item.act_as::<TerminalView>(cx))
|
||||
.map(InlineAssistTarget::Terminal)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue