From 23c5fc1b03fcb0e5a1c08764f298c8689acaab3c Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:19:29 +0200 Subject: [PATCH] chore: Use explicit if let instead of for .. in option (#15086) Fixes one clippy violation from 1.80 (that's due for release tomorrow). Release Notes: - N/A --- crates/editor/src/hover_popover.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index f8eb6967aeb6f7e770fa5a8c284cff5c4e5b26d7..009dae8ce7fbfc0c0e0c106c1142a1888a21e00d 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -545,7 +545,7 @@ impl HoverState { pub fn focused(&self, cx: &mut ViewContext) -> bool { let mut hover_popover_is_focused = false; for info_popover in &self.info_popovers { - for markdown_view in &info_popover.parsed_content { + if let Some(markdown_view) = &info_popover.parsed_content { if markdown_view.focus_handle(cx).is_focused(cx) { hover_popover_is_focused = true; }