Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use let chain to avoid `clippy::unnecessary_unwrap` (#46409)
Martin Pool3f2c7c6d30e9
diff --git a/crates/gpui/src/elements/div.rs b/crates/gpui/src/elements/div.rsindex 6d13fa6a8d2..03dfee3efbd 100644--- a/crates/gpui/src/elements/div.rs+++ b/crates/gpui/src/elements/div.rs@@ -1983,12 +1983,12 @@ impl Interactivity {) {use crate::{BorderStyle, TextAlign};- if global_id.is_some()+ if let Some(global_id) = global_id&& (style.debug || style.debug_below || cx.has_global::<crate::DebugBelow>())&& hitbox.is_hovered(window){const FONT_SIZE: crate::Pixels = crate::Pixels(10.);- let element_id = format!("{:?}", global_id.unwrap());+ let element_id = format!("{global_id:?}");let str_len = element_id.len();let render_debug_text = |window: &mut Window| {