Mark simple functions const.

This commit is contained in:
Stephen Chung
2021-06-28 18:06:05 +08:00
parent 0c99165007
commit e40e81ac1a
16 changed files with 243 additions and 210 deletions

View File

@@ -2064,7 +2064,12 @@ impl Engine {
.lib()
.iter_fn()
.filter(|f| f.func.is_script())
.map(|f| f.func.get_fn_def().clone())
.map(|f| {
f.func
.get_script_fn_def()
.expect("never fails because the function is scripted")
.clone()
})
.collect();
#[cfg(feature = "no_function")]