summaryrefslogtreecommitdiff
path: root/src/eval/methods.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-13 23:16:40 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-14 13:53:02 +0200
commitc81e2a5f56eb262663f292578c683fba7f18251f (patch)
tree6c045a8dcbec5e75e01a15f970ef8cee6ff042d0 /src/eval/methods.rs
parent891af17260a6750a74a102388a05e59cf1ffc3c1 (diff)
Many fixes
Diffstat (limited to 'src/eval/methods.rs')
-rw-r--r--src/eval/methods.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/methods.rs b/src/eval/methods.rs
index d425e007..1ac0ce61 100644
--- a/src/eval/methods.rs
+++ b/src/eval/methods.rs
@@ -72,7 +72,7 @@ pub fn call(
Value::Dyn(dynamic) => match method {
"matches" => {
if let Some(regex) = dynamic.downcast::<Regex>() {
- Value::Bool(regex.matches(&args.expect::<EcoString>("text")?))
+ Value::Bool(regex.is_match(&args.expect::<EcoString>("text")?))
} else {
missing()?
}
@@ -125,7 +125,7 @@ pub fn call_mut(
},
Value::Dict(dict) => match method {
- "remove" => dict.remove(&args.expect("key")?).at(span)?,
+ "remove" => dict.remove(&args.expect::<EcoString>("key")?).at(span)?,
_ => missing()?,
},