diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-09 14:05:57 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-09 22:44:40 +0200 |
| commit | bce553a991f19b2b5bb9efef6b74bd12e15a10c6 (patch) | |
| tree | fa8ed4b3974927b30e6cffd0d71d4c3e980698de /src/pretty.rs | |
| parent | 29cfef0a6dfef5820bda339d327638e285aaf4d3 (diff) | |
Tidy up
Diffstat (limited to 'src/pretty.rs')
| -rw-r--r-- | src/pretty.rs | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/pretty.rs b/src/pretty.rs index 82e81ce6..1281e27b 100644 --- a/src/pretty.rs +++ b/src/pretty.rs @@ -4,7 +4,7 @@ use std::fmt::{self, Arguments, Write}; use crate::color::{Color, RgbaColor}; use crate::eval::*; -use crate::geom::{Angle, Fractional, Length, Linear, Relative, TrackSizing}; +use crate::geom::{Angle, Fractional, Length, Linear, Relative}; use crate::syntax::*; /// Pretty print an item and return the resulting string. @@ -451,24 +451,24 @@ impl Pretty for Ident { impl Pretty for Value { fn pretty(&self, p: &mut Printer) { match self { - Value::None => p.push_str("none"), - Value::Bool(v) => v.pretty(p), - Value::Int(v) => v.pretty(p), - Value::Float(v) => v.pretty(p), - Value::Length(v) => v.pretty(p), - Value::Angle(v) => v.pretty(p), - Value::Relative(v) => v.pretty(p), - Value::Fractional(v) => v.pretty(p), - Value::Linear(v) => v.pretty(p), - Value::TrackSizing(v) => v.pretty(p), - Value::Color(v) => v.pretty(p), - Value::Str(v) => v.pretty(p), - Value::Array(v) => v.pretty(p), - Value::Dict(v) => v.pretty(p), - Value::Template(v) => v.pretty(p), - Value::Func(v) => v.pretty(p), - Value::Any(v) => v.pretty(p), - Value::Error => p.push_str("<error>"), + Self::None => p.push_str("none"), + Self::Auto => p.push_str("auto"), + Self::Bool(v) => v.pretty(p), + Self::Int(v) => v.pretty(p), + Self::Float(v) => v.pretty(p), + Self::Length(v) => v.pretty(p), + Self::Angle(v) => v.pretty(p), + Self::Relative(v) => v.pretty(p), + Self::Linear(v) => v.pretty(p), + Self::Fractional(v) => v.pretty(p), + Self::Color(v) => v.pretty(p), + Self::Str(v) => v.pretty(p), + Self::Array(v) => v.pretty(p), + Self::Dict(v) => v.pretty(p), + Self::Template(v) => v.pretty(p), + Self::Func(v) => v.pretty(p), + Self::Any(v) => v.pretty(p), + Self::Error => p.push_str("<error>"), } } } @@ -579,9 +579,8 @@ pretty_display! { Length, Angle, Relative, - Fractional, Linear, - TrackSizing, + Fractional, RgbaColor, Color, AnyValue, |
