From e4979875735f82a3129d231e74d84e902b08f038 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 5 Dec 2025 23:48:33 -0500 Subject: [PATCH] fix target wasm cfg --- src/math_app.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/math_app.rs b/src/math_app.rs index 74e6bd2..f76e17d 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -173,11 +173,11 @@ impl MathApp { .read_to_end(&mut data) .expect("unable to read compressed data"); - #[cfg(target = "wasm32")] + #[cfg(target_arch = "wasm32")] { tracing::info!("Setting decompression cache"); - let saved_data = hashed_storage_create(data); + let saved_data = crate::misc::hashed_storage_create(&data); tracing::info!("Bytes: {}", saved_data.len()); get_localstorage() .set_item(DATA_NAME, saved_data) @@ -192,7 +192,7 @@ impl MathApp { // Initialize fonts // This used to be in the `update` method, but (after a ton of digging) this actually caused OOMs. that was a pain to debug cc.egui_ctx.set_fonts({ - #[cfg(target = "wasm32")] + #[cfg(target_arch = "wasm32")] if let Some(Ok(data)) = get_storage_decompressed().map(|data| bincode::deserialize(data.as_slice())) { @@ -201,7 +201,7 @@ impl MathApp { decompress_fonts() } - #[cfg(not(target = "wasm32"))] + #[cfg(not(target_arch = "wasm32"))] decompress_fonts() });