functions no longer modify state, funcrefs exist

you can use &func as a function, too.
this allows the function to mutate its
inner state.
This commit is contained in:
Mark
2024-07-01 20:51:09 +02:00
parent 7acaafaa2f
commit 18cd3ee0ae
21 changed files with 330 additions and 191 deletions

View File

@@ -23,7 +23,7 @@ fn main() -> Result<(), CheckError> {
// use the function to decorate these 3 test strings
for input in ["my test string", "Main Menu", "O.o"] {
let result = func.run(Data::new(data::string::String(input.to_owned())))?;
let result = func.run_immut(Data::new(data::string::String(input.to_owned())))?;
let result = result.get();
let result = &result
.as_any()