Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
html: Remove Windows workaround (#38069)
Max Brunsfeld837f282f1ea2
diff --git a/Cargo.lock b/Cargo.lockindex 7be9a902400..38e993f21c0 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -20397,6 +20397,17 @@ dependencies = ["wit-bindgen 0.41.0",]+[[package]]+name = "zed_extension_api"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0729d50b4ca0a7e28e590bbe32e3ca0194d97ef654961451a424c661a366fca0"+dependencies = [+ "serde",+ "serde_json",+ "wit-bindgen 0.41.0",+]+[[package]]name = "zed_glsl"version = "0.1.0"@@ -20408,7 +20419,7 @@ dependencies = [name = "zed_html"version = "0.2.2"dependencies = [- "zed_extension_api 0.1.0",+ "zed_extension_api 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",][[package]]diff --git a/extensions/html/Cargo.toml b/extensions/html/Cargo.tomlindex 27425da6718..b8d0513f9bf 100644--- a/extensions/html/Cargo.toml+++ b/extensions/html/Cargo.toml@@ -13,4 +13,4 @@ path = "src/html.rs"crate-type = ["cdylib"][dependencies]-zed_extension_api = "0.1.0"+zed_extension_api = "0.7.0"diff --git a/extensions/html/src/html.rs b/extensions/html/src/html.rsindex 371824c830a..27fd2d1e222 100644--- a/extensions/html/src/html.rs+++ b/extensions/html/src/html.rs@@ -77,7 +77,8 @@ impl zed::Extension for HtmlExtension {Ok(zed::Command {command: zed::node_binary_path()?,args: vec![- zed_ext::sanitize_windows_path(env::current_dir().unwrap())+ env::current_dir()+ .unwrap().join(&server_path).to_string_lossy().to_string(),@@ -110,24 +111,3 @@ impl zed::Extension for HtmlExtension {}zed::register_extension!(HtmlExtension);--mod zed_ext {- /// Sanitizes the given path to remove the leading `/` on Windows.- ///- /// On macOS and Linux this is a no-op.- ///- /// This is a workaround for https://github.com/bytecodealliance/wasmtime/issues/10415.- pub fn sanitize_windows_path(path: std::path::PathBuf) -> std::path::PathBuf {- use zed_extension_api::{Os, current_platform};-- let (os, _arch) = current_platform();- match os {- Os::Mac | Os::Linux => path,- Os::Windows => path- .to_string_lossy()- .to_string()- .trim_start_matches('/')- .into(),- }- }-}