diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
| commit | 0f7c70fd93db23ec866ae13aa2f146b7787afabf (patch) | |
| tree | 7a67019fa77931e1722789cfd27997dd82a9b521 /src/eval/value.rs | |
| parent | 6672f8f7dfcb38bbda3ec92bdf95341c05e9a782 (diff) | |
Separate state and constraints 🧶
Diffstat (limited to 'src/eval/value.rs')
| -rw-r--r-- | src/eval/value.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs index f6c1fcd7..f88c0704 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -12,7 +12,7 @@ use crate::geom::Linear; use crate::layout::{Command, Commands, Dir, LayoutContext, SpecAlign}; use crate::paper::Paper; use crate::syntax::{Ident, Span, SpanWith, Spanned, SynNode, SynTree}; -use crate::{DynFuture, Feedback, Pass}; +use crate::{DynFuture, Feedback}; /// A computational value. #[derive(Clone, PartialEq)] @@ -149,13 +149,13 @@ impl Debug for Value { pub struct FuncValue(pub Rc<FuncType>); /// The signature of executable functions. -type FuncType = dyn Fn(Span, DictValue, LayoutContext<'_>) -> DynFuture<Pass<Value>>; +type FuncType = dyn Fn(DictValue, &mut LayoutContext) -> DynFuture<Value>; impl FuncValue { /// Create a new function value from a rust function or closure. pub fn new<F: 'static>(f: F) -> Self where - F: Fn(Span, DictValue, LayoutContext<'_>) -> DynFuture<Pass<Value>>, + F: Fn(DictValue, &mut LayoutContext) -> DynFuture<Value>, { Self(Rc::new(f)) } |
