add lifetime parameter

This commit is contained in:
l1npengtul 2022-11-05 22:53:58 +09:00
parent c49948def4
commit a8ae82e3d8

View File

@ -216,7 +216,7 @@ pub fn set_ahash_seed(new_seed: Option<[u64; 4]>) -> Result<(), Option<[u64; 4]>
/// See [`set_rhai_ahash_seed`] for more. /// See [`set_rhai_ahash_seed`] for more.
#[inline] #[inline]
#[must_use] #[must_use]
pub fn get_ahash_seed() -> &Option<[u64; 4]> { pub fn get_ahash_seed() -> &'static Option<[u64; 4]> {
match AHASH_SEED.get_or_init(|| hashing_env::AHASH_SEED) { match AHASH_SEED.get_or_init(|| hashing_env::AHASH_SEED) {
Some(ash) => ash, Some(ash) => ash,
None => None, None => None,