Fix panic in wasm extensions (#17922)

Release Notes:

- N/A

Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
Conrad Irwin
2024-09-16 21:35:28 -06:00
committed by GitHub
co-authored by Peter Tripp
parent 83192c29e8
commit 1285504b3e
@@ -55,16 +55,7 @@ pub type ExtensionHttpResponseStream = Arc<Mutex<::http_client::Response<AsyncBo
pub fn linker() -> &'static Linker<WasmState> {
static LINKER: OnceLock<Linker<WasmState>> = OnceLock::new();
LINKER.get_or_init(|| {
super::new_linker(|linker, f| {
Extension::add_to_linker(linker, f)?;
latest::zed::extension::github::add_to_linker(linker, f)?;
latest::zed::extension::nodejs::add_to_linker(linker, f)?;
latest::zed::extension::platform::add_to_linker(linker, f)?;
latest::zed::extension::slash_command::add_to_linker(linker, f)?;
Ok(())
})
})
LINKER.get_or_init(|| super::new_linker(Extension::add_to_linker))
}
impl From<Command> for latest::Command {