From 3d9c0b12c6b34185e556071ee16401691bfd8e49 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 24 Jun 2020 17:00:44 +0100 Subject: fix: panic on remote import on wasm Sadly we would need proper async support for that to work --- dhall/src/semantics/resolve/resolve.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'dhall/src/semantics') diff --git a/dhall/src/semantics/resolve/resolve.rs b/dhall/src/semantics/resolve/resolve.rs index fb770db..114bd9b 100644 --- a/dhall/src/semantics/resolve/resolve.rs +++ b/dhall/src/semantics/resolve/resolve.rs @@ -201,10 +201,8 @@ pub(crate) fn download_http_text(url: Url) -> Result { Ok(reqwest::blocking::get(url).unwrap().text().unwrap()) } #[cfg(target_arch = "wasm32")] -pub(crate) fn download_http_text(url: Url) -> Result { - blocking::block_on(async { - Ok(reqwest::get(url).await.unwrap().text().await.unwrap()) - }) +pub(crate) fn download_http_text(_url: Url) -> Result { + panic!("Remote imports are not supported on wasm yet") } fn make_aslocation_uniontype() -> Expr { -- cgit v1.2.3