From 54c7d9dc5fc915cf979d2df8f514ebd4b8f3fb2d Mon Sep 17 00:00:00 2001 From: Chuqiao Feng Date: Sun, 24 Aug 2025 19:01:42 +0800 Subject: [PATCH] Fix crash when opening inspector on Windows debug build (#36829) --- Cargo.lock | 1 + crates/inspector_ui/Cargo.toml | 1 + crates/inspector_ui/src/div_inspector.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 0575796034e1e0725122418c61ff718afa2f09ea..c835b503ad214edea10225da8c3828d7ea32e616 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8468,6 +8468,7 @@ dependencies = [ "theme", "ui", "util", + "util_macros", "workspace", "workspace-hack", "zed_actions", diff --git a/crates/inspector_ui/Cargo.toml b/crates/inspector_ui/Cargo.toml index 8e55a8a477e5346bd12ec594b36ac04e197dfc8e..cefe888974da2c9d164ad97079441ddec2d7fdff 100644 --- a/crates/inspector_ui/Cargo.toml +++ b/crates/inspector_ui/Cargo.toml @@ -24,6 +24,7 @@ serde_json_lenient.workspace = true theme.workspace = true ui.workspace = true util.workspace = true +util_macros.workspace = true workspace-hack.workspace = true workspace.workspace = true zed_actions.workspace = true diff --git a/crates/inspector_ui/src/div_inspector.rs b/crates/inspector_ui/src/div_inspector.rs index 0c2b16b9f49019bff1f7860ae5cd658ae20f12b5..c3d687e57adbb0b1883d81f6e7ba726d0d60974d 100644 --- a/crates/inspector_ui/src/div_inspector.rs +++ b/crates/inspector_ui/src/div_inspector.rs @@ -25,7 +25,7 @@ use util::split_str_with_ranges; /// Path used for unsaved buffer that contains style json. To support the json language server, this /// matches the name used in the generated schemas. -const ZED_INSPECTOR_STYLE_JSON: &str = "/zed-inspector-style.json"; +const ZED_INSPECTOR_STYLE_JSON: &str = util_macros::path!("/zed-inspector-style.json"); pub(crate) struct DivInspector { state: State,