Fix strange new compile errors
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-21 09:07:26 +02:00
parent c0e4702e45
commit db88d31394
3 changed files with 26 additions and 4 deletions

View File

@@ -51,11 +51,14 @@ macro_rules! script_function_cache {
{
let read_lock = self.$name.read();
if let Some(f) = read_lock.as_ref() {
return Some(f.clone());
return Some(TypedFunction::clone(f));
}
}
self.[<initialize_ $name>](env);
self.$name.read().as_ref().cloned()
match self.$name.read().as_ref() {
Some(f) => Some(TypedFunction::clone(f)),
None => None,
}
}
}
)*