From 40ea35cbe7482ce04096c4d63a848c8601cc1848 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 3 Feb 2020 10:37:50 +0100 Subject: =?UTF-8?q?Upgrade=20to=20new=20toddle=20interface=20=F0=9F=90=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/func/values.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/syntax/func') diff --git a/src/syntax/func/values.rs b/src/syntax/func/values.rs index 515d6a43..e4a0b2ad 100644 --- a/src/syntax/func/values.rs +++ b/src/syntax/func/values.rs @@ -145,7 +145,7 @@ impl Value for FontStyle { type Output = Self; fn parse(expr: Spanned) -> Result { - FontStyle::from_str(Ident::parse(expr)?.as_str()) + FontStyle::from_name(Ident::parse(expr)?.as_str()) .ok_or_else(|| err!("invalid font style")) } } @@ -166,7 +166,7 @@ impl Value for FontWeight { } } Expr::Ident(id) => { - FontWeight::from_str(id.as_str()) + FontWeight::from_name(id.as_str()) .ok_or_else(|| err!("invalid font weight")) .map(|weight| (weight, false)) } @@ -180,7 +180,7 @@ impl Value for Paper { type Output = Self; fn parse(expr: Spanned) -> Result { - Paper::from_str(Ident::parse(expr)?.as_str()) + Paper::from_name(Ident::parse(expr)?.as_str()) .ok_or_else(|| err!("invalid paper type")) } } -- cgit v1.2.3