This commit is contained in:
Simon Gardling
2023-08-25 11:07:59 -04:00
parent 7e1fe54d59
commit 3d0d3ef7a3
7 changed files with 43 additions and 10 deletions

View File

@@ -383,10 +383,11 @@ impl MathApp {
#[cfg(target_arch = "wasm32")]
{
tracing::info!("Saving function data");
use crate::misc::{HashBytes, HashBytesHelper};
use crate::misc::{hashed_storage_create, HashBytes};
let hash: HashBytes =
unsafe { std::mem::transmute::<&str, HashBytes>(build::SHORT_COMMIT) };
let saved_data = hash.hashed_storage_create(
let saved_data = hashed_storage_create(
hash,
&bincode::serialize(&self.functions)
.expect("unable to deserialize functions"),
);