summaryrefslogtreecommitdiffstats
path: root/crates/rebel-lang/examples/repl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rebel-lang/examples/repl.rs')
-rw-r--r--crates/rebel-lang/examples/repl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rebel-lang/examples/repl.rs b/crates/rebel-lang/examples/repl.rs
index 8d76ec8..42e8d62 100644
--- a/crates/rebel-lang/examples/repl.rs
+++ b/crates/rebel-lang/examples/repl.rs
@@ -12,14 +12,14 @@ fn intrinsic_array_len(params: &[Value]) -> Result<Value> {
let Value::Array(array) = &params[0] else {
panic!();
};
- Ok(Value::Integer(array.len().try_into().or(Err(EvalError))?))
+ Ok(Value::Int(array.len().try_into().or(Err(EvalError))?))
}
fn intrinsic_string_len(params: &[Value]) -> Result<Value> {
assert!(params.len() == 1);
let Value::Str(string) = &params[0] else {
panic!();
};
- Ok(Value::Integer(
+ Ok(Value::Int(
string.chars().count().try_into().or(Err(EvalError))?,
))
}