Fix clippy::manual_map lint violations (#36584)

#36577

Release Notes:

- N/A
This commit is contained in:
tidely 2025-08-20 16:17:28 +03:00 committed by GitHub
parent de12633591
commit bc79076ad3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 62 additions and 118 deletions

View file

@ -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))

View file

@ -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,

View file

@ -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)
}
}
}