summaryrefslogtreecommitdiff
path: root/src/eval
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-13 16:57:15 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-13 16:57:15 +0100
commitceb00a2e779ce17b75fd996b4e5f48ab543a1e63 (patch)
tree058aaa25e8688dd1bd046e6baa2d508b82efff42 /src/eval
parentf190d33d0ca024d322668c0cd1df1eca20ed0210 (diff)
Factor out alignment deduplication into separate function ♻
Diffstat (limited to 'src/eval')
-rw-r--r--src/eval/value.rs5
1 files changed, 3 insertions, 2 deletions
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<ValueAny> for Value {
/// - [`Cast<Value>`](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) }