diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-24 15:42:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-24 15:47:42 +0200 |
| commit | 8fbb11fc05b3313bf102c1f23693290661d00863 (patch) | |
| tree | a198db77338f1cc1304fe50f55020b08e22bca60 /src/eval/ops.rs | |
| parent | e4ee14e54fb87961096856c7ea105435b7cc3c45 (diff) | |
Extract `model` module
Diffstat (limited to 'src/eval/ops.rs')
| -rw-r--r-- | src/eval/ops.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/eval/ops.rs b/src/eval/ops.rs index 70352039..832bd354 100644 --- a/src/eval/ops.rs +++ b/src/eval/ops.rs @@ -5,6 +5,7 @@ use std::cmp::Ordering; use super::{Dynamic, RawAlign, RawStroke, Smart, StrExt, Value}; use crate::diag::StrResult; use crate::geom::{Numeric, Spec, SpecAxis}; +use crate::model; use Value::*; /// Bail with a type mismatch error. @@ -20,8 +21,8 @@ pub fn join(lhs: Value, rhs: Value) -> StrResult<Value> { (a, None) => a, (None, b) => b, (Str(a), Str(b)) => Str(a + b), - (Str(a), Content(b)) => Content(super::Content::Text(a) + b), - (Content(a), Str(b)) => Content(a + super::Content::Text(b)), + (Str(a), Content(b)) => Content(model::Content::Text(a) + b), + (Content(a), Str(b)) => Content(a + model::Content::Text(b)), (Content(a), Content(b)) => Content(a + b), (Array(a), Array(b)) => Array(a + b), (Dict(a), Dict(b)) => Dict(a + b), @@ -86,8 +87,8 @@ pub fn add(lhs: Value, rhs: Value) -> StrResult<Value> { (Content(a), None) => Content(a), (None, Content(b)) => Content(b), (Content(a), Content(b)) => Content(a + b), - (Content(a), Str(b)) => Content(a + super::Content::Text(b)), - (Str(a), Content(b)) => Content(super::Content::Text(a) + b), + (Content(a), Str(b)) => Content(a + model::Content::Text(b)), + (Str(a), Content(b)) => Content(model::Content::Text(a) + b), (Array(a), Array(b)) => Array(a + b), (Dict(a), Dict(b)) => Dict(a + b), |
