From 6ae6d86b9c6fefe6c5379ac1b20ea90634c09c81 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 14 Aug 2021 15:24:59 +0200 Subject: Separate type for string values --- src/exec/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/exec/mod.rs') 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()), } } } -- cgit v1.2.3