diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-03 11:44:53 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-03 13:35:39 +0100 |
| commit | 37a7afddfaffd44cb9bc013c9506599267e08983 (patch) | |
| tree | 20e7d62d3c5418baff01a21d0406b91bf3096214 /src/model/value.rs | |
| parent | 56342bd972a13ffe21beaf2b87ab7eb1597704b4 (diff) | |
Split crates
Diffstat (limited to 'src/model/value.rs')
| -rw-r--r-- | src/model/value.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/model/value.rs b/src/model/value.rs index d68f42a0..07719883 100644 --- a/src/model/value.rs +++ b/src/model/value.rs @@ -7,11 +7,10 @@ use std::sync::Arc; use comemo::Tracked; use siphasher::sip128::{Hasher128, SipHasher}; -use super::{ops, Args, Array, Cast, Content, Dict, Func, Node, Str}; +use super::{format_str, ops, Args, Array, Cast, Content, Dict, Func, Str}; use crate::diag::StrResult; use crate::geom::{Abs, Angle, Color, Em, Fr, Length, Ratio, Rel, RgbaColor}; -use crate::library::text::TextNode; -use crate::util::EcoString; +use crate::util::{format_eco, EcoString}; use crate::World; /// A computational value. @@ -385,7 +384,7 @@ primitive! { Str: "string", Str } primitive! { Content: "content", Content, None => Content::empty(), - Str(text) => TextNode(text.into()).pack() + Str(text) => Content::text(text) } primitive! { Array: "array", Array } primitive! { Dict: "dictionary", Dict } @@ -395,6 +394,7 @@ primitive! { Args: "arguments", Args } #[cfg(test)] mod tests { use super::*; + use crate::model::{array, dict}; #[track_caller] fn test(value: impl Into<Value>, exp: &str) { |
