pub type ScriptSha1 = [u8; 20];Expand description
A SHA1 hash of a script’s source bytes. Used as the EVALSHA cache
key. Includes any #!lua version=N shebang in the input, so a
5.1 script and the same script with a 5.3 shebang have distinct
SHA1s and never collide in the cache.
use kevy_lua::{Bridge, ScriptSha1};
let mut b = Bridge::with_no_dispatch();
let plain: ScriptSha1 = b.script_load(b"return 1");
let pinned: ScriptSha1 = b.script_load(b"#!lua version=5.3\nreturn 1");
assert_eq!(plain, kevy_lua::sha1::sha1(b"return 1"));
assert_ne!(plain, pinned);