From ceb00a2e779ce17b75fd996b4e5f48ab543a1e63 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 13 Mar 2021 16:57:15 +0100 Subject: =?UTF-8?q?Factor=20out=20alignment=20deduplication=20into=20separ?= =?UTF-8?q?ate=20function=20=E2=99=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/eval/value.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/eval/value.rs') diff --git a/src/eval/value.rs b/src/eval/value.rs index 7f31ea13..20636917 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -619,8 +619,9 @@ impl From for Value { /// - [`Cast`](Cast) for `T`. /// /// # Example -/// Make a type `FontFamily` that can be cast from a [`Value::Any`] variant -/// containing a `FontFamily` or from a string. +/// Allow a type `FontFamily` to be cast from: +/// - a [`Value::Any`] variant already containing a `FontFamily` +/// - a string, producing a `FontFamiliy::Named(..)`. /// ``` /// # use typst::typify; /// # enum FontFamily { Named(String) } -- cgit v1.2.3