[no version bump yet] better and safer stdlib impl

only transformed configs/with_string so far,
but other configs/* should follow soon.
also, this will help with implementing
new stdlib functions in the future.
This commit is contained in:
Mark
2024-07-02 22:04:42 +02:00
parent 18cd3ee0ae
commit 50928cca1d
21 changed files with 841 additions and 184 deletions

View File

@@ -30,7 +30,7 @@ fn run(src: String) -> Result<(), CheckError> {
)
.add_var(
"rust_func".to_owned(),
Data::new(data::function::Function::new(
Data::new(data::function::Function::new_generic(
|arg| {
// If the input is a string, the output is a string.
// Otherwise, the function is used incorrectly.