diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-14 15:24:59 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-14 15:55:39 +0200 |
| commit | 6ae6d86b9c6fefe6c5379ac1b20ea90634c09c81 (patch) | |
| tree | 2504c3b46807be148b9efbadf9b23e57bb77b8f3 /src/exec/mod.rs | |
| parent | fcb4e451186067cdf6efe3c14cbfa7561b366a6c (diff) | |
Separate type for string values
Diffstat (limited to 'src/exec/mod.rs')
| -rw-r--r-- | src/exec/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 373a3263..ac4c1fca 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -11,7 +11,6 @@ use std::fmt::Write; use crate::eval::{ExprMap, Template, TemplateFunc, TemplateNode, TemplateTree, Value}; use crate::geom::Gen; use crate::layout::{LayoutTree, StackChild, StackNode}; -use crate::pretty::pretty; use crate::syntax::*; use crate::util::EcoString; use crate::Context; @@ -133,13 +132,13 @@ impl Exec for Value { fn exec(&self, ctx: &mut ExecContext) { match self { Value::None => {} - Value::Int(v) => ctx.push_text(pretty(v)), - Value::Float(v) => ctx.push_text(pretty(v)), + Value::Int(v) => ctx.push_text(v.to_string()), + Value::Float(v) => ctx.push_text(v.to_string()), Value::Str(v) => ctx.push_text(v), Value::Template(v) => v.exec(ctx), // For values which can't be shown "naturally", we print the // representation in monospace. - other => ctx.push_monospace_text(pretty(other)), + other => ctx.push_monospace_text(other.to_string()), } } } |
