Enable clippy::map_flatten
(#8733)
This PR enables the [`clippy::map_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#/map_flatten) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
8bc35c33c5
commit
eaf2fbb21b
10 changed files with 13 additions and 26 deletions
|
@ -238,7 +238,7 @@ impl CopilotButton {
|
|||
|
||||
impl StatusItemView for CopilotButton {
|
||||
fn set_active_pane_item(&mut self, item: Option<&dyn ItemHandle>, cx: &mut ViewContext<Self>) {
|
||||
if let Some(editor) = item.map(|item| item.act_as::<Editor>(cx)).flatten() {
|
||||
if let Some(editor) = item.and_then(|item| item.act_as::<Editor>(cx)) {
|
||||
self.editor_subscription = Some((
|
||||
cx.observe(&editor, Self::update_enabled),
|
||||
editor.entity_id().as_u64() as usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue