mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-14 11:16:17 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user