summaryrefslogtreecommitdiff
path: root/library/src/layout/table.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-17 16:27:40 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-17 18:18:47 +0100
commitaf7fe4d76083c597ec2198a73383b9e3899d75ea (patch)
treecb3b9766ee15dbfbecf7f9b9a2257859d7a7b3c7 /library/src/layout/table.rs
parent6d64d3e8e9123f3fa8166c8b710e2b2c61ed5898 (diff)
Hover and autocomplete in show rules
Diffstat (limited to 'library/src/layout/table.rs')
-rw-r--r--library/src/layout/table.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/library/src/layout/table.rs b/library/src/layout/table.rs
index 024bb0d6..d4b6e7d7 100644
--- a/library/src/layout/table.rs
+++ b/library/src/layout/table.rs
@@ -227,14 +227,13 @@ pub enum Celled<T> {
impl<T: Cast + Clone> Celled<T> {
/// Resolve the value based on the cell position.
- pub fn resolve(&self, vt: &Vt, x: usize, y: usize) -> SourceResult<T> {
+ pub fn resolve(&self, vt: &mut Vt, x: usize, y: usize) -> SourceResult<T> {
Ok(match self {
Self::Value(value) => value.clone(),
- Self::Func(func) => {
- let args =
- Args::new(func.span(), [Value::Int(x as i64), Value::Int(y as i64)]);
- func.call_detached(vt.world, args)?.cast().at(func.span())?
- }
+ Self::Func(func) => func
+ .call_vt(vt, [Value::Int(x as i64), Value::Int(y as i64)])?
+ .cast()
+ .at(func.span())?,
})
}
}