From ec332b4e496189efe899c1e0ba4d1f789df38b55 Mon Sep 17 00:00:00 2001 From: l1npengtul Date: Mon, 31 Oct 2022 22:20:43 +0900 Subject: [PATCH] add errors doc for set rhai fn --- src/config.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config.rs b/src/config.rs index 4297fa07..9ea638bb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,6 +29,9 @@ static AHASH_SEED: OnceLock> = OnceLock::new(); /// - You can only call this function **ONCE** for the whole of your program execution. /// - You should gracefully handle the `Err(())`. /// - You **MUST** call this before **ANY** Rhai operation occurs (e.g. creating an [`Engine`]). +/// +/// # Errors +/// This will error if the AHashSeed is already set. pub fn set_rhai_ahash_seed(new_seed: Option<[u64; 4]>) -> Result<(), Option<[u64; 4]>> { AHASH_SEED.set(new_seed) }