From 79e7c305bf86193846f050858e68f6946c23a0c8 Mon Sep 17 00:00:00 2001 From: l1npengtul Date: Tue, 1 Nov 2022 01:26:23 +0900 Subject: [PATCH] fix templateing issue --- build.rs | 2 +- src/config/hashing.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index dda0850e..a994ef69 100644 --- a/build.rs +++ b/build.rs @@ -18,7 +18,7 @@ fn main() { let seed = env::var("RHAI_AHASH_SEED").map_or_else(|_| "None".into(), |s| format!("Some({s})")); - contents = contents.replace("{{AHASH_SEED}}", &seed); + contents = contents.replace("{{ AHASH_SEED }}", &seed); File::create("src/config/hashing.rs") .expect("cannot create `config.rs`") diff --git a/src/config/hashing.rs b/src/config/hashing.rs index 709a3f65..19423149 100644 --- a/src/config/hashing.rs +++ b/src/config/hashing.rs @@ -117,7 +117,7 @@ mod internal { #[cfg(not(feature = "static_hash"))] mod internal { - const AHASH_SEED: Option<[u64; 4]> = {{ AHASH_SEED }}; + const AHASH_SEED: Option<[u64; 4]> = None; /// Gets the current Rhai Ahash Seed. If the seed is not yet defined, this will automatically set a seed. /// The default seed is not stable and may change between versions.