make types::Function callable
This commit is contained in:
parent
d9b86f430f
commit
995122f1e0
|
|
@ -102,3 +102,9 @@ impl Hash for Function {
|
||||||
std::ptr::hash(self.inner.as_ref(), state)
|
std::ptr::hash(self.inner.as_ref(), state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Function {
|
||||||
|
pub fn call(&self, args: &[Value]) -> Value {
|
||||||
|
(self.inner)(args)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user